<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_gakusei</title><subtitle type="text">VC VB</subtitle><id>http://feed.cnblogs.com/blog/u/46511/rss</id><updated>2012-05-11T02:32:01Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/46511/rss"/><entry><id>http://www.cnblogs.com/gakusei/archive/2011/01/08/1930628.html</id><title type="text">plan plan...</title><summary type="text">再学习 好困啊开发游戏</summary><published>2011-01-08T06:26:00Z</published><updated>2011-01-08T06:26:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2011/01/08/1930628.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2011/01/08/1930628.html"/><content type="html">该文被密码保护。</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/05/21/1486096.html</id><title type="text">vb 数组(非字符串) vc</title><summary type="text">一般来说，VB和VC共同编程有3种方式：一种是VC生成DLL，在VB中调用DLL；一种是VC生成ActiveX 控件(.ocx)，在VB中插入；还有一种是在VC中生成ActiveX Automation服务器，在VB中调用。相对而言，第一种方法对VC编程者的要求最低，但要求你的伙伴进行配合，我推荐这种方法。 先说说VC++的编程。首先在VC++中生成Win32 DLL工程。在这个工程中添加几个函...</summary><published>2009-05-21T03:32:00Z</published><updated>2009-05-21T03:32:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/05/21/1486096.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/05/21/1486096.html"/><content type="text">一般来说，VB和VC共同编程有3种方式：一种是VC生成DLL，在VB中调用DLL；一种是VC生成ActiveX 控件(.ocx)，在VB中插入；还有一种是在VC中生成ActiveX Automation服务器，在VB中调用。相对而言，第一种方法对VC编程者的要求最低，但要求你的伙伴进行配合，我推荐这种方法。 先说说VC++的编程。首先在VC++中生成Win32 DLL工程。在这个工程中添加几个函...</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/05/21/1486048.html</id><title type="text">C++ 动态数组</title><summary type="text">#include&lt;iostream&gt; #include&lt;conio.h&gt; #include&lt;cstdlib&gt; //此头文件包含函数exit(),由于C++可识别exit()，实际上该头文件可省略 using namespace std; void display(double ***); void de_lete(double ***); int x,y,z; ...</summary><published>2009-05-21T02:46:00Z</published><updated>2009-05-21T02:46:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/05/21/1486048.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/05/21/1486048.html"/><content type="text">#include&lt;iostream&gt; #include&lt;conio.h&gt; #include&lt;cstdlib&gt; //此头文件包含函数exit(),由于C++可识别exit()，实际上该头文件可省略 using namespace std; void display(double ***); void de_lete(double ***); int x,y,z; ...</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/05/21/1485950.html</id><title type="text">BSTR转换成char* </title><summary type="text">方法一，使用ConvertBSTRToString。例如： #include #pragma comment(lib, "comsupp.lib") int _tmain(int argc, _TCHAR* argv[]){ BSTR bstrText = ::SysAllocString(L"Test"); char* lpszText2 = _com_util::ConvertBSTRToSt...</summary><published>2009-05-21T01:51:00Z</published><updated>2009-05-21T01:51:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/05/21/1485950.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/05/21/1485950.html"/><content type="text">方法一，使用ConvertBSTRToString。例如： #include #pragma comment(lib, "comsupp.lib") int _tmain(int argc, _TCHAR* argv[]){ BSTR bstrText = ::SysAllocString(L"Test"); char* lpszText2 = _com_util::ConvertBSTRToSt...</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/05/12/1454902.html</id><title type="text">无题</title><summary type="text">Dim s As String, f As Longs = ProgressFrm.Weber.Document.documentElement.innerHTMLf = FreeFileOpen "C:\ss.txt" For Binary As #fPut #f, , sClose #f</summary><published>2009-05-12T07:28:00Z</published><updated>2009-05-12T07:28:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/05/12/1454902.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/05/12/1454902.html"/><content type="text">Dim s As String, f As Longs = ProgressFrm.Weber.Document.documentElement.innerHTMLf = FreeFileOpen "C:\ss.txt" For Binary As #fPut #f, , sClose #f</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/05/04/1448566.html</id><title type="text">VB 字符串数组 vc</title><summary type="text">VB的字符串数组是由BSTR组成的SafeArray类型，所以VB里DLL函数如此声明： Private Declare FunctionMyFun Lib "MyDll" (ByVal strarr As Variant) As Long 建立MFC DLL工程，名为 ShowVBStrArr 编译生成 ShowVBStrArr.DLL DLL函数原形： extern "C" BOOL __st...</summary><published>2009-05-04T03:13:00Z</published><updated>2009-05-04T03:13:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/05/04/1448566.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/05/04/1448566.html"/><content type="text">VB的字符串数组是由BSTR组成的SafeArray类型，所以VB里DLL函数如此声明： Private Declare FunctionMyFun Lib "MyDll" (ByVal strarr As Variant) As Long 建立MFC DLL工程，名为 ShowVBStrArr 编译生成 ShowVBStrArr.DLL DLL函数原形： extern "C" BOOL __st...</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/04/24/1442979.html</id><title type="text">不定个数参数</title><summary type="text">int sum(int first, ...); //一般加一个识别参数 { int count = 0, sumAll = 0, i = first; va_list marker; va_start( marker, first); //开始查找 while( i != -1 ) { sumAll += i; count++; i = va_arg( ...</summary><published>2009-04-24T07:44:00Z</published><updated>2009-04-24T07:44:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/04/24/1442979.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/04/24/1442979.html"/><content type="text">int sum(int first, ...); //一般加一个识别参数 { int count = 0, sumAll = 0, i = first; va_list marker; va_start( marker, first); //开始查找 while( i != -1 ) { sumAll += i; count++; i = va_arg( ...</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/04/24/1442827.html</id><title type="text">C# COM</title><summary type="text">VC中调用非托管的C# COM，须将COM注册为tlb放在release/debug目录下!在VB的开发环境中，VB会最先搜索开发环境程序目录下面的文件！而且像上面那种调用了C#里面东西的dll放在工程目录下，vb可能找不到或者报其它错，不晓得为什么，先记下</summary><published>2009-04-24T04:41:00Z</published><updated>2009-04-24T04:41:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/04/24/1442827.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/04/24/1442827.html"/><content type="text">VC中调用非托管的C# COM，须将COM注册为tlb放在release/debug目录下!在VB的开发环境中，VB会最先搜索开发环境程序目录下面的文件！而且像上面那种调用了C#里面东西的dll放在工程目录下，vb可能找不到或者报其它错，不晓得为什么，先记下</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/04/14/1435359.html</id><title type="text">VC返回给VB的字符串为什么为空</title><summary type="text">VB的字符串格式是BSTR，如果你了解COM编程，你对这个类型不会陌生，而DLL中的字符串变量是标准C字符串格式，你应该将返回的字符串变量的类型定义为类_bstr_t，它是VC的类，封装了BSTR的操作，在MFC和ATL中都可用。VB中的字符串是用SysAllocString申请空间的,如果不想用COM的话把VC中的函数改为: EXTERN_C BSTR WINAPI RetStr() {char...</summary><published>2009-04-14T01:07:00Z</published><updated>2009-04-14T01:07:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/04/14/1435359.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/04/14/1435359.html"/><content type="text">VB的字符串格式是BSTR，如果你了解COM编程，你对这个类型不会陌生，而DLL中的字符串变量是标准C字符串格式，你应该将返回的字符串变量的类型定义为类_bstr_t，它是VC的类，封装了BSTR的操作，在MFC和ATL中都可用。VB中的字符串是用SysAllocString申请空间的,如果不想用COM的话把VC中的函数改为: EXTERN_C BSTR WINAPI RetStr() {char...</content></entry><entry><id>http://www.cnblogs.com/gakusei/archive/2009/04/10/1432992.html</id><title type="text">try catch throw </title><summary type="text">class CMyexception {}; try {int nTemp = 0; if( nTemp == 0 ){throw(nTemp);//也可以写成 throw nTemp; //直接写成throw;抛出是这之前产生的异常，不要这么写，调试及运行的时候可能会出错!//这样写的方式最好只出现在catch() 语句块中!throw;重新抛出的原异常而非原异常的拷贝1}CMy...</summary><published>2009-04-10T03:58:00Z</published><updated>2009-04-10T03:58:00Z</updated><author><name>荷包蛋</name><uri>http://www.cnblogs.com/gakusei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/gakusei/archive/2009/04/10/1432992.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/gakusei/archive/2009/04/10/1432992.html"/><content type="text">class CMyexception {}; try {int nTemp = 0; if( nTemp == 0 ){throw(nTemp);//也可以写成 throw nTemp; //直接写成throw;抛出是这之前产生的异常，不要这么写，调试及运行的时候可能会出错!//这样写的方式最好只出现在catch() 语句块中!throw;重新抛出的原异常而非原异常的拷贝1}CMy...</content></entry></feed>
