Reputation: 1891
Is there any WDM mechanism, similar to EXPORT_SYMBOL under Linux, such that one can use symbols from a driver (A.sys) in another driver (B.sys)?
Upvotes: 1
Views: 622
Reputation: 980
This is same mechanism as user mode, basically drivers are same PE images as user mode. Simplest approach to mark functions that you wish to export as _declspec(dllexport). And add to header definition _declspec(dllimport):
_declspec(dllexport) void ExportSymbol1(void); void ExportSymbol1(void) { KdPrint(("exported call\n")); }
and
_declspec(dllimport) void ExportSymbol1(void);
Also you can use export driver approach (http://msdn.microsoft.com/en-us/library/windows/hardware/ff542891(v=vs.85).aspx)
Upvotes: 1