I have the following codes:
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);
}
It compiles to mydll.dll.
Then, when I try to do
rundll32.exe mydll.dll,Entry
It gives me the error message
Error in mydll.dll
Missing entry: Entry
What am I missing here?