Re: how to link library made by VS with driver using DDK environment



You cannot. Rebuild this library source for kernel mode.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

"remedius" <remedius@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8DB3C81A-3632-49C1-8195-95AD871C5141@xxxxxxxxxxxxxxxx
Hello!
I have a dll library (AXACAC.dll) whuch was made in VS project. This dll
exports one function:

#ifdef __cplusplus
extern "C" {
#endif

#pragma once
#ifdef WIN_EXPORTSN
#define WIN_API __declspec(dllexport)
#else
#define WIN_API __declspec(dllimport)
#endif

WIN_API void CreateRasterFile (const char *, const char *);

#ifdef __cplusplus
}
#endif

And I try to import this function in the DDK sample - unidrv interface
plug-in:
__declspec(dllimport) void CreateRasterFile (const char *, const char *);

In my src file I include my *.lib file as:
TARGETLIBS= ..\AXACAC.lib

But when I try to build DDK sample I have the following error:
error LNK2019: unresolved external symbol __imp__CreateRasterFile@8
referenced in function _OEMSendPage@4
..\..\i386\VPrinter.dll : fatal error LNK1120: 1 unresolved externals

Could you suggest something? May be you have ever had the same problems...

.



Relevant Pages

  • Re: how to link library made by VS with driver using DDK environment
    ... The dll probably is compiled with cdecl and the DDK code with stdcall. ... In my src file I include my *.lib file as: ...
    (microsoft.public.development.device.drivers)
  • CRT section Error!
    ... The project compiles successfully when I use the Visual studio+DDK enviroment ... but gives this error on the DDK command line enviroment.On compiling I am ... !ENDIF ... # setup visualC++ source browsing ...
    (microsoft.public.development.device.drivers)
  • How can I get rid of source path in release driver?
    ... I am builing a release driver using XP DDK 2600 free build environment. ... # XP/Later DDK build env being used ... !ENDIF ...
    (microsoft.public.development.device.drivers)