编写用于rundll32.exe的DLL
我有以下代码:
mydll.h:
#include __declspec(dllexport) void CALLBACK Entry(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);
mydll.c:
#include "mydll.h" void CALLBACK Entry(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) { FILE *f; f = fopen("C:\\Users\\user\\Desktop\\test.txt", "rw"); fprintf(f, "test"); fclose(f); }
它编译为mydll.dll。
然后,当我尝试做的时候
rundll32.exe mydll.dll,Entry
它给了我错误信息
Error in mydll.dll Missing entry: Entry
我在这里想念的是什么?