Hello,
I have a BO to which I have added external reference to "C:\Windows\System32\winspool.drv" and in Global Code section following lines:
[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool SetDefaultPrinter(string Name);
When check code I get the following error message:
Page: Initialise
Stage: Stage1
Type: Error
Action: Validate
Description: Compiler error at top section line -4: Metadata file 'c:\Windows\System32\winspool.drv' could not be opened -- 'An attempt was made to load a program with an incorrect format. '
Repairable: No
Is it possible to import drv files in BP global code? If not, is thetr any workaround for this? I need to retrieve the default printer in C# code block.
Best regards,
Mikko