Я написал стандартную DLL в Visual Studio 6 C ++.Я также написал typelib, чтобы он мог использоваться непосредственно в VB6, а не через Declare.
Отлично работает в VB6 под Windows XP.
Что не работает, так это когда я беру DLL и TLB в Vista и Windows7.Там .TLB отлично регистрируется с REGTLIB
, но единственным символом, который виден в Visual Studio 2008, является константа Attribution
.
Техника, которую я пытаюсь эмулировать, находится на Как сделать C DLL более доступной для VB с библиотекой типов .Это тот случай, когда этот метод больше не применяется ???
(сокращенный) код ODL воспроизводится ниже.Есть идеи, что происходит?
// 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 (eay@cryptsoft.com)";
} // End of Module
}; // End of Library