dll问题,调用dll中的窗体
dll中的接口函数
function Init(hWndParent: HWND; gid: Int64; pszUserPath: LPCTSTR): HWND; stdcall;
begin
CoInitialize(nil);
FrmPCDll := TFrmPCDll.CreateParented(hWndParent);
FrmPCDll.Visible := True;
Result := FrmPCDll.Handle;
end;
调用时
begin
Init(Handle, 0, 'aaa');
end;
在关闭主程序时总是出错,提示Runtime error 216 at 004A661D
应该如何处理?