在我的项目中,我无法跟踪项目的入口发生在哪里。当我查看调用堆栈时,它给出的hirerchy为
mfc100d.dll!_DllMainCRTStartup(void* hDllHandle, unsigned long dwReason, void *lpreserved) ntdll.dll!77328968()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!77335c11()
ntdll.dll!7733500a()
ntdll.dll!773335e9
我创建了一个windows服务,希望检查系统是64位还是32位,在检查之后,从我的服务器.But下载适当的文件,我现在拥有的代码无法工作。
我在用。
int system = IntPtr.Size;
if (system == 4)
{
//the system is 32 bit
WebClient webClient = new WebClient();
webClient.DownloadFile("http://www.myserver.com/updates/dll/bin.dll", "C:\bin.dll");
}
我正在编写一个DLL来导出要在Excel中使用的函数--我已经找到了一种方法来传递参数,但使用的是损坏的名称。如果设置时没有名称损坏,则无法传递参数并获得调用约定错误。
我使用标准声明来调用从VBA导出的DLL函数:
VBA
Public Declare Function foo Lib "C:\ ... \helloworld.dll" (ByVal bar As Long) As Long
我的职能是这样设置的:
helloworld.cpp
extern "C" __declspec(dllexport) long foo(long bar){
我在Delphi中有一个单元(可以选择)提供一个单一的全局对象:
var
InternalThemeParkServices: TThemeParkServices;
function ThemeParkServices: TThemeParkServices;
begin
if InternalThemeParkServices= nil then
InternalThemeParkServices := TThemeParkServices.Create();
Result := InternalThemeParkServices ;
end;
...