Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec68092

Browse files
committed
DLL version is now loaded from a string resource.
1 parent f57c170 commit ec68092

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

PC/dl_nt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ forgotten) from the programmer.
1313
#include "config.h"
1414
#include "Python.h"
1515

16+
char dllVersionBuffer[16] = ""; // a private buffer
17+
18+
// Python Globals
1619
HMODULE PyWin_DLLhModule = NULL;
20+
const char *PyWin_DLLVersionString = dllVersionBuffer;
21+
1722

1823
BOOL WINAPI DllMain (HANDLE hInst,
1924
ULONG ul_reason_for_call,
@@ -23,6 +28,8 @@ BOOL WINAPI DllMain (HANDLE hInst,
2328
{
2429
case DLL_PROCESS_ATTACH:
2530
PyWin_DLLhModule = hInst;
31+
// 1000 is a magic number I picked out of the air. Could do with a #define, I spose...
32+
LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer));
2633
//initall();
2734
break;
2835
case DLL_PROCESS_DETACH:

0 commit comments

Comments
 (0)