Visual Studio 6C++で標準のDLLを作成しました。また、Declareを介さずに、VB6で直接使用できるように、それに対応するtypelibを作成しました。
WindowsXPのVB6では正常に動作します。
DLLとTLBをVistaとWindows7に取り込むと、機能しなくなります。そこで.TLBは正常に登録されますが、VisualStudio2008REGTLIB
で表示される唯一の記号はAttribution
定数です。
私がエミュレートしようとしている手法は、タイプライブラリを使用してCDLLを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