⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 The code for this article was written for version 1.0 of the Active Template Library (ATL). The cu
💻 TXT
字号:
              Extending Visual Basic with C++ DLLs
                           Sample Code

Note that these articles were written for Visual C++ 4.x. The
code compiled and worked under that environment. Some of the code
did not compile under Visual C++ 5.0, and I assume it still won't
under Visual C++ 6.0. I haven't been in a C++ state of mind since
I wrote the articles, and therefore I haven't tracked down the
cause of the problem. I imagine it has something to do with
changes in C++ syntax related to the ANSI C++ standard (which was
being drafted at the time).

Despite these problems, the articles have a lot of useful
information that isn't provided anywhere else that I'm aware of.
I haven't updated them to take advantage of new technology (such
as the MIDL compiler). At one point, I tried to work out a deal
to update the articles for MSDN, but MSDN isn't into paying for
their articles, and I'm not into working for free, so their isn't
much incentive to update. Therefore I offer the original
documents as a historical document that may have some current
value.

The code has the following directory structure:

Cpp4VB          Visual Basic Cpp4VB project to test libraries
    WinTlb      Windows API Functions type library
    OleType     OleType static library project files
    VBUtil      VBUTIL dynamic link library project files
    Include     Standard include files (.H and .ODL)
    Lib         OleType static library (Debug and Release)
    Bin         Type libraries and DLLs

You should copy the include files in the Include directory to your a
standard INCLUDE directory. Copy the static libraries to a standard LIB 
directory. You can copy the contents of the Bin directory to your Windows 
directory or some other location in your path.

You can load the .MDP project files into Microsoft Visual C++. If you
have a different compiler or if you prefer building from a command
line, you may still be able to use the .MAK files. Note that this code 
was 

For easier Unicode debugging, you may want to copy the following
definitions to your AUTOEXP.DAT file in the MSDEV binary directory
(default C:\MSDEV\BIN):

; From BString.h
String =<m_bs,su>

; From Variant.h
Variant =vt=<vt,x> short=<iVal> long=<lVal> dbl=<dblVal,g> str=<bstrVal,su>

[Unicode]
DisplayUnicode=1


Note: The Unicode Release version of VBUTIL32.DLL caused a protection
fault when built with full optimization under Visual C++ version 4.1.
Therefore, this version uses custom optimization settings that avoid
the problem. I had not yet isolated the bug when this version of the
library was completed, but you can avoid it by using similar
optimizations rather than the default release settings in your own
Unicode projects.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -