Calling an exe function from within a dll

I need to call the "MULTIPLE" functions that are inside an EXE from a DLL location. And I will also need access to some of the variables found inside the EXE from the DLL. The following is a list of errors, it may not be useful at all, but in any case it is attached. I did the opposite (exe-> dll) using .def and dllimport files and additional dependencies. And now I'm stuck with the opposite. Note: Micros * t Visual Studio 2008 pro, Standard-C.

3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_GentityNum が 関 数 _SV_BotAllocateClient で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2001: 外部 シ ン ボ ル "_svs" は 未 解決 で す。
3> sv_bot.obj: error LNK2001: 外部 シ ン ボ ル "_sv_maxclients" は 未 解決 で す。
3> sv_bot.obj: error LNK2001: 外部 シ ン ボ ル "_botlib_export" は 未 解決 で す。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Cvar_Get が 関 数 _BotDrawDebugPolygons で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_Trace が 関 数 _BotImport_Trace で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_ClipToEntity が 関 数 _BotImport_EntityTrace で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_PointContents が 関 数 _BotImport_PointContents で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_inPVS が 関 数 _BotImport_inPVS で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _CM_EntityString が 関 数 _BotImport_BSPEntityData で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _CM_ModelBounds が 関 数 _BotImport_BSPModelMinsMaxsOrigin で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _CM_InlineModel が 関 数 _BotImport_BSPModelMinsMaxsOrigin で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Z_TagMalloc が 関 数 _BotImport_GetMemory で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Z_Free が 関 数 _BotImport_FreeMemory で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Hunk_Alloc が 関 数 _BotImport_HunkAlloc で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Hunk_CheckMark が 関 数 _BotImport_HunkAlloc で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_ExecuteClientCommand が 関 数 _BotClientCommand で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _VM_Call が 関 数 _SV_BotFrame で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2001: 外部 シ ン ボ ル "_gvm" は 未 解決 で す。
2> ラ イ ブ ラ リ .. \ .. \ build \ quake3_release \ ioquake3.lib と オ ブ ジ ェ ク ト .. \ .. \ build \ quake3_release \ ioquake3.exp を 作成 中
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _GetBotLibAPI が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _FS_Seek が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _FS_FCloseFile が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _FS_Write が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _FS_Read2 が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _FS_FOpenFileByMode が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Z_AvailableMemory が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Z_Malloc が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> sv_bot.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _Cvar_VariableIntegerValue が 関 数 _SV_BotInitBotLib で 参照 さ れ ま し た。
3> .. \ .. \ build \ game_release \ qagamex86.dll: fatal error LNK1120: 外部 参照 28 が 未 解決 で す。
2> LINK: warning LNK4098: defaultlib 'LIBCMT' は 他 の ラ イ ブ ラ リ の 使用 と 競合 し て い ま す 。/NODEFAULTLIB:library を 使用 し て く だ さ い。
3> ビ ル ド ロ グ は "file: // c: \ Documents and Settings \ yasir \ デ ス ク ト ッ プ \ ioquake3dev \ ioquake3dev - sandbox \ build \ game_release \ BuildLog.htm" に 保存 さ れ ま し た。
3> game - エ ラ ー 29 、 警告 0
2> LINK: warning LNK4199: /DELAYLOAD:OleAcc.dll は 無視 さ れ ま す 。OleAcc.dll に イ ン ポ ー ト が あ り ま せ ん。
2> cm_patch.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _BotDrawDebugPolygons が 関 数 _CM_DrawDebugSurface で 参照 さ れ ま し た。
2> sv_client.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotFreeClient が 関 数 _SV_DropClient で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2001: 外部 シ ン ボ ル "_SV_BotFreeClient" は 未 解決 で す。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotGetConsoleMessage が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotGetSnapshotEntity が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotLibShutdown が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotLibSetup が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _BotImport_DebugPolygonDelete が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _BotImport_DebugPolygonCreate が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotAllocateClient が 関 数 _SV_GameSystemCalls で 参照 さ れ ま し た。
2> sv_game.obj: error LNK2001: 外部 シ ン ボ ル "_bot_enable" は 未 解決 で す。
2> sv_init.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotFrame が 関 数 _SV_SpawnServer で 参照 さ れ ま し た。
2> sv_main.obj: error LNK2001: 外部 シ ン ボ ル "_SV_BotFrame" は 未 解決 で す。
2> sv_init.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotInitBotLib が 関 数 _SV_Init で 参照 さ れ ま し た。
2> sv_init.obj: error LNK2019: 未 解決 の 外部 シ ン ボ ル _SV_BotInitCvars が 関 数 _SV_Init で 参照 さ れ ま し た。
2> .. \ .. \ build \ quake3_release \ ioquake3.exe: fatal error LNK1120: 外部 参照 13 が 未 解決 で す。
2> ビ ル ド ロ グ は "file: // c: \ Documents and Settings \ yasir \ デ ス ク ト ッ プ \ ioquake3dev \ ioquake3dev - sandbox \ build \ quake3_release \ BuildLog.htm" に 保存 さ れ ま し た。。
2> quake3 - エ ラ ー 16 、 警告 2
=========== ビ ル ド: 0 正常 終了 、 2 失敗 、 2 更新 不要 、 1 ス キ ッ プ ==========
+3
source share
1 answer

, DLL EXE. , exe. . DLL- DLL. , DLL EXE-, , struct.

+1

Source: https://habr.com/ru/post/1790417/


All Articles