I have written a standard DLL in Visual Studio 6 C++. I have also written a typelib to go with it so that it can be used directly in VB6 rather than via Declare.
It works fine in VB6 under Windows XP.
What doesn't work is when I take the DLL and the TLB into Vista and Windows7. There the .TLB registers fine with REGTLIB
but the only symbol that is visible in Visual Studio 2008 is the Attribution
constant.
The technique I'm attempting to emulate is found at How To Make C DLL More Accessible to VB with a Type Library. Is it the case that this technique no longer applies???
The (abbreviated) ODL code is reproduced below. Any idea what's going on?
// This is the type library for BOBDE.dll
[
// Use GUIDGEN.EXE to create the UUID that uniquely identifies
// this library on the user's system. NOTE: This must be done!!
uuid(EE090BD0-AB6C-454c-A3D7-44CA46B1289F),
// This helpstring defines how the library will appear in the
// References dialog of VB.
helpstring("BOBDE TypeLib"),
// Assume standard English locale.
lcid(0x0409),
// Assign a version number to keep track of changes.
version(1.0)
]
library BOBDE
{
// Now define the module that will "declare" your C functions.
[helpstring("Functions in BOBDE.DLL"), version(1.0),dllname("BOBDE.dll")]
module BOBDEFunctions
{
[helpstring("Blowfish Encode ASCII for ANSI"), entry("BEA_A")]
void __stdcall BEA_A( [in] BSTR p1, [in] BSTR p2, [out,retval] BSTR* res );
// other very similar functions removed for the sake of brevity
const LPSTR Attribution = "This product includes cryptographic software written by Eric Young ([email protected])";
} // End of Module
}; // End of Library