cancel
Showing results for 
Search instead for 
Did you mean: 

BO Global Code: Compiler error -4: metadata file (drv) could not be opened

MikkoKutilainen
Level 2
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
3 REPLIES 3

Denis__Dennehy
Level 15
Hello, No, it is not possible to reference a .drv file in Blue Prism code (which is .NET 4.0 based).

PrateekMehan
Level 6
Please let me know too if you get a workaround or any solution to this

MikkoKutilainen
Level 2
Okey, thank you for your reply. Br, Mikko