Page 2 of 2
Re: New Users Questions.
Posted: Tue Mar 01, 2011 8:12 pm
by swhite
IdeasVacuum wrote:Hi Simon
What does the specific FoxPro function do? Is it handling strings? FoxPro may be using a different type of string to that of PB. PB uses a 'C' type null-terminated string, I'm thinking maybe FoxPro uses a Microsoft type of string, such as LPTSTR, ASCIIZ or a-n-other.
The functions checks a number of tables to determine a response string that is to be sent back to a remote device to authorize a transaction at the fuel pump. Yes VFP strings are different than PB string but my understanding is that COM automation uses Unicode strings in parameters and return values so I am assuming the value returned from the COM dll will be a unicode string. I just have to learn how to correctly retrieve it in PB.
Simon
Re: New Users Questions.
Posted: Wed Mar 02, 2011 5:08 am
by IdeasVacuum
...even the term 'Unicode' is vague - that's also about a method of describing character sets rather than specifically how a programming language handles them. PB supports various Unicode flavours, using constant flags to identify Unicode, UTF8, UTF16 etc. C handles extended character sets as 'wide' characters. So, you really do need to know the type of string, don't assume anything. The next question you might ask yourself is, does it have to be FoxPro anyway? Oh all right, that wasn't you it was me

I think FoxPro is pretty well dead now though isn't it?
Re: New Users Questions.
Posted: Wed Mar 02, 2011 3:47 pm
by swhite
IdeasVacuum wrote:...even the term 'Unicode' is vague - that's also about a method of describing character sets rather than specifically how a programming language handles them. PB supports various Unicode flavours, using constant flags to identify Unicode, UTF8, UTF16 etc. C handles extended character sets as 'wide' characters. So, you really do need to know the type of string, don't assume anything. The next question you might ask yourself is, does it have to be FoxPro anyway? Oh all right, that wasn't you it was me

I think FoxPro is pretty well dead now though isn't it?
The only reason it is in Visual FoxPro is because the Purebasic application has to share access to clients' Visual FoxPro databases with a VFP application. VFP maybe dead as far as MS is concerned but it is used by an active number of developers and additional features are being built at
http://vfpx.codeplex.com. The real reason MS stopped production of VFP was because it competed directly with Visual Studio.
My alternate plan which I am also pursuing is using the Advantage Database Server. I have imported the Advantage Client Engine into PB and it works well. However, it is more work to develop and test the database layer I have built in PB than to use VFP which has been running flawlessly for years so I would like to have 2 viable tools for this project.
Simon