How can I access a library using LOADLIBRARY when the header file contains data types such as DWORD, HWND, LPSTR, BYTE, LPDWORD?
Show older comments
I want to use LOADLIBRARY to access a DLL. The header file that I have looks like this:
DWORD InitController (DWORD ControllerMode, HWND UserWin, UINT AsyncMsg);
DWORD SetDecimalSeparator(BYTE DecimalSep);
DWORD GetReply(LPSTR Reply);
DWORD GetError(LPDWORD Error);
When I try to load the library as follows:
[notfound,warnings] = loadlibrary('MyLib','MyLib.h')
I get a lot of warnings such as the following:
ERROR: Type 'DWORD' was not found. Defaulting to type error.
Found on line 1 of input from line 1 of file MyLib.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 1 of input from line 1 of file MyLib.h
Type 'BYTE' was not found. Defaulting to type error.
Found on line 2 of input from line 1 of file MyLib.h
Type 'LPSTR' was not found. Defaulting to type error.
Found on line 3 of input from line 1 of file MyLib.h
Type 'LPDWORD' was not found. Defaulting to type error.
Found on line 4 of input from line 1 of file MyLib.h
Accepted Answer
More Answers (0)
Categories
Find more on Structured Data and XML Documents in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!