dllimport in C

Hi.

I want to import a dll file in C.I tried this.But this is not true:
1
2
3
4
5
6
7
#include <stdio.h>
int __declspec(dllimport)("user32.dll")MessageBox(void* hWnd, wchar_t* lpText, wchar_t* lpCaption, 
                  unsigned int uType);
                  
int main(){
    MessageBox( 0, L"Hello world!", L"Greetings", 0 );
    }
What does that code have to do with importing a DLL? All it does is put up a message box.

This might point you in the right direction.
http://www.cplusplus.com/forum/windows/73726/
Last edited on
Topic archived. No new replies allowed.