R rossj New Member Licensed User Feb 25, 2008 #1 How do you access enumeration values in external dll's ? I am trialling the FieldSoftware PrinterCE program which uses Enumerations in some of the properties. For example: the "PrOrientation" property uses ORIENTATION.PORTRAIT or ORIENTATION.LANDSCAPE - the example they give is: PrinterCE1.PrOrientation = PrinterCE.ORIENTATION.LANDSCAPE <-this is the issue.:sign0085:
How do you access enumeration values in external dll's ? I am trialling the FieldSoftware PrinterCE program which uses Enumerations in some of the properties. For example: the "PrOrientation" property uses ORIENTATION.PORTRAIT or ORIENTATION.LANDSCAPE - the example they give is: PrinterCE1.PrOrientation = PrinterCE.ORIENTATION.LANDSCAPE <-this is the issue.:sign0085:
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2008 #2 I'm not sure if it will work but you can try to pass the enum value instead. LANDSCAPE = 2 PORTRAIT = 1
I'm not sure if it will work but you can try to pass the enum value instead. LANDSCAPE = 2 PORTRAIT = 1
R rossj New Member Licensed User Feb 27, 2008 #3 Thanks Erel, but I had already tried that option. It causes an "ArgumentException". I contacted Field Software by email and they sent me a link to download a list of their global user definitions (prceuser.h). That does give a list of the value of each enumeration instead of trying to guess the value - but it doesn't solve the probelm. I have responded to their email advising there must be something in their code causing the exception. I'll advise you if they have a solution.
Thanks Erel, but I had already tried that option. It causes an "ArgumentException". I contacted Field Software by email and they sent me a link to download a list of their global user definitions (prceuser.h). That does give a list of the value of each enumeration instead of trying to guess the value - but it doesn't solve the probelm. I have responded to their email advising there must be something in their code causing the exception. I'll advise you if they have a solution.
Erel B4X founder Staff member Licensed User Longtime User Feb 27, 2008 #4 I don't think that they will be able to solve this problem. You will need to use a custom wrapper. It should be a pretty simple wrapper. I may build one in the future.
I don't think that they will be able to solve this problem. You will need to use a custom wrapper. It should be a pretty simple wrapper. I may build one in the future.
D dzt Active Member Licensed User Feb 27, 2008 #5 Hi, This is a simple b4ppc PrinterCE wrapper, written in VB.NET in the past for my own needs. Source code and SharpDevelop solution included. Needs also PrCE_NetCF.DLL and PrinterCE.NETCF.DLL form FieldSoftware. Attachments dzPrinterCE.zip dzPrinterCE.zip 11.3 KB · Views: 513
Hi, This is a simple b4ppc PrinterCE wrapper, written in VB.NET in the past for my own needs. Source code and SharpDevelop solution included. Needs also PrCE_NetCF.DLL and PrinterCE.NETCF.DLL form FieldSoftware.
R rossj New Member Licensed User Feb 28, 2008 #6 Hi Guys, The repsonse from Field Software was "We have not used Basic4ppc, so you will need to contact their support to determine how to accomplish what you are seeking." I will download your wrapper - thanks for your assistance.
Hi Guys, The repsonse from Field Software was "We have not used Basic4ppc, so you will need to contact their support to determine how to accomplish what you are seeking." I will download your wrapper - thanks for your assistance.
M manu Active Member Licensed User Longtime User Jun 20, 2008 #7 Hi friends You have any example of how to use Printerce with Basic4ppc? Thank you