0

我有以下代码:

mydll.h:

#include <Windows.h>

__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

我在这里想念什么?

4

0 回答 0