|
Подключение dll к inno setup
|
|||
---|---|---|---|
#18+
Помогите пожалуйста ! Не могу вызвать ф-ю из dll, написанную на с++ в inno setup [Files] Source: UserCr.dll; DestDir: "{app}"; Source: "d:\Database.FDB"; DestDir: "{app}" ; Flags: ignoreversion uninsremovereadonly [code] function User(param: boolean): boolean; external 'User@files:UserCr.dll stdcall setuponly' ; procedure CurStepChanged(CurStep: TSetupStep); var FileName: String; BOOL: Boolean; begin if CurStep = ssDone then begin FileName:=ExpandConstant('{pf64}') + '\Firebird\Firebird_2_5\aliases.conf'; SaveStringToFile(FileName, #13#10 + 'UT_DB=' + ExpandConstant('{app}') + '\Database.FDB' + #13#10, True); FileName:=ExpandConstant('{pf32}') + '\Firebird\Firebird_2_5\aliases.conf'; SaveStringToFile(FileName, #13#10 + 'UT_DB=' + ExpandConstant('{app}') + '\Database.FDB' + #13#10, True); BOOL:=User(true); end; end; ****************************Вот код dll*********************************** #include "stdafx.h" #using <System.dll> #using <System.data.dll> //#using <System.Xml.dll> using namespace System; using namespace System::Data; using namespace System::Data::Odbc; using namespace System::Text; #define BOOL bool BOOL User(BOOL param) { MessageBoxA(NULL,"Hello inno setup", "Message from dll", MB_OK); OdbcConnection * myOdbcConnection; myOdbcConnection = new OdbcConnection (S"Database=localhost:UT_DB;DSN=DatabaseDB;uid=SYSDBA;pwd=masterkey;Charset=WIN1251"); myOdbcConnection->Open(); OdbcCommand * myCommand; myCommand = new OdbcCommand (S"EXECUTE PROCEDURE SP_CREATE_USER", myOdbcConnection); myCommand->ExecuteNonQuery(); myOdbcConnection->Close(); return param; } ************************************************************************** Вот, что выдаёт inno setup Cannot Import dll:C:\Users\USER\AppData\Local\Temp\is-9Q910.tmp\UserCr.dll. функцию User экспортирую через .def файл. ... |
|||
:
Нравится:
Не нравится:
|
|||
22.04.2015, 16:27 |
|
|
start [/forum/topic.php?fid=20&msg=38942763&tid=1401627]: |
0ms |
get settings: |
9ms |
get forum list: |
16ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
114ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
45ms |
get tp. blocked users: |
1ms |
others: | 16ms |
total: | 224ms |
0 / 0 |