I am making a very simple dialog box in C since I needed certain features that I couldn't get with NSIS.
The program works as a dll, but now I am trying to convert it into a plugin and having all sorts of problems.
Essentially I have a function that calls the dialog box and based on whats returned gets a certain number which the dll function is calling.
This was the original before adding the dll (obviously the below wasnt commented out)
void __declspec(dllexport) SHOW(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
{
g_stacktop=stacktop;
{
popstring(szBuf);
popstring(szError);
nVarError=getvarindex(szError);
wsprintf(szBuf, "%d", RunDialogBox() );
setvar(nVarError, szBuf, string_size, variables);
}
}
Warning 1 warning C4133: 'function' : incompatible types - from 'char *' to 'LPWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 73 DemoDialogBoxDll
//__declspec(dllexport)
int RunDialogBox() // DemoDialogBoxDll::RunDialogBox
{
int result = FALSE;
result = DialogBoxParam(hModule, MAKEINTRESOURCE(IDD_DIALOG), NULL, DialogProc, (LPARAM)(NULL));
return result;
}
Warning 2 warning C4133: 'function' : incompatible types - from 'char [1024]' to 'LPCWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 73 DemoDialogBoxDll
Warning 3 warning C4133: 'function' : incompatible types - from 'char *' to 'LPWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 83 DemoDialogBoxDll
Warning 4 warning C4133: 'function' : incompatible types - from 'const char *' to 'LPCWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 83 DemoDialogBoxDll
Warning 5 warning C4133: 'function' : incompatible types - from 'char *' to 'LPCWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 91 DemoDialogBoxDll
......
Warning 46 warning C4133: 'function' : incompatible types - from 'char [3]' to 'LPCWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 164 DemoDialogBoxDll
And help is greatly appreciated.