Could you give me a way to convert a VB printer driver DLL code to a corresponding VFP one?

Hi Experts

I need to use a printer DLL ( Mp2032.dll ) that  drives a printer guillotine after a ticket print.
The manufacturer gave this VB code to do the job:

Accordingly to (in Portuguese):
Manufaturer instructions

Public Declare Function AcionaGuilhotina Lib "MP2032.DLL" (ByVal Modo As Integer) As Integer Public Declare Function ComandoTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal Flag As Integer) As Integer

'After declare the functions, to execute ComandoTX, do like that:

'To drive the guillotine
sComando = chr(27) + chr(119) 
iRetorno = ComandoTX( sComando, Len( sComando )

'or I guess, optionally

iRetorno = AcionaGuilhotina(1)

Open in new window

Could you give me a way to convert this VB printer driver to a corresponding VFP one?

Thanks in advance!
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Paul MacDonaldDirector, Information SystemsCommented:
I LOVE VFP, but it's been dead 20 years now.  I have to ask: Why convert to it?
Eduardo FuerteDeveloper and AnalystAuthor Commented:

I guess last VFP release (patches) at about 10 years ago

The reason is: I have an "in production "app developed in VFP that needs this convertion.

In a similar manner that huge companies have COBOL app (40+) years old running and receiving actualizations.

I couldn't develop this app to an up to date platform. It attends philantropic institutions (no profit job, free of cost for them - very, very util for them)
This conversion is very easy but we cannot say the code is "VB or VFP printer driver".  The code just calls some printer driver represented by MP2032.DLL.
* The MP2032.DLL must be in the current folder or available on the path and it has to be 32 bit. 
* Of course, you may use full path to the DLL file

DECLARE Integer AcionaGuilhotina IN MP2032.DLL Integer MoDo
DECLARE Integer ComandoTX IN MP2032.DLL String BufTrans, Integer Flag

sComando = chr(27) + chr(119) 
iRetorno = ComandoTX( sComando, Len( sComando ))

iRetorno = AcionaGuilhotina(1)

Open in new window

As you may see VFP code is very similar to VB code. The best you can do is to test the code in Visual FoxPro Command window.

BTW, unofficial VFP patches are still under development. And official VFP tools are still supported by the community.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Eduardo FuerteDeveloper and AnalystAuthor Commented:

I misconcept on the way to ask, I know that the VPF only commands a printer driver.

I'm going to make another question about details on what's going on VFP - unofficial patches etc.

Thank your always excelent help!
Eduardo FuerteDeveloper and AnalystAuthor Commented:
(*) Thank you for your always
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.