Prev Previous Post   Next Post Next
Old 5th October 2009, 14:13   #1
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
Help with plugin development

Hi,

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.

code:

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);
}
}



This was the original before adding the dll (obviously the below wasnt commented out)

code:

//__declspec(dllexport)
int RunDialogBox() // DemoDialogBoxDll::RunDialogBox
{
int result = FALSE;

result = DialogBoxParam(hModule, MAKEINTRESOURCE(IDD_DIALOG), NULL, DialogProc, (LPARAM)(NULL));

return result;
}




Warning 1 warning C4133: 'function' : incompatible types - from 'char *' to 'LPWSTR' c:\Documents and Settings\jweinraub\Desktop\DemoDialogBoxDll\DemoDialogBoxDll\DemoDialogBoxDll.c 73 DemoDialogBoxDll
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.
jweinraub is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump