[fpc-pascal] mmsystem unit : errors

2005-08-02 Thread Jean-Marc Chourot
Hi all, Could someone help to understand what happens with this piece of code : When I call the following function, I very very often receive an error :MCIERR_PARAM_OVERFLOW: writeln(err,' The output string was not long enough.'); Does anybody know why ? why is the pchar too small ? thx for help JM

Re: [fpc-pascal] Extended float to single and pchar types

2005-08-02 Thread Urbansound
- Original Message - From: "Matt Emson" <[EMAIL PROTECTED]> To: "Urbansound" <[EMAIL PROTECTED]>; "FPC-Pascal users discussions" Sent: Tuesday, August 02, 2005 11:26 AM Subject: Re: [fpc-pascal] Extended float to single and pchar types Are you sure it is stdcall? Quite often it's

Re: [fpc-pascal] fast integer multiplication and one asm questio

2005-08-02 Thread Gerhard Scholz
For learning some basics of assembler you should download the NASM, it is bundled with a documentation; more documentation should be found at the intel sides. Or e.g. try http://www.agner.org/assem But keep in mind that the exact syntax differs from assembler to assembler. Also a good idea is to

[fpc-pascal] Re: Can a program find out how it was started?

2005-08-02 Thread Jeff Pohlmeyer
> Is it possible for a program to tell whether it was started > from the command line or started by double-clicking on > the application icon? Under Win98, there are some subtle differences in the output of the program below, when run from a DOS window vs. double-clicking the icon. I don't kno

Re: [fpc-pascal] Extended float to single and pchar types

2005-08-02 Thread Matt Emson
> Hi, > > I have a stdcall reference to a c based dll. called target.dll > In c the setup is ... Are you sure it is stdcall? Quite often it's the calling convention that messes up the calling of a C DLL. Could it be safecall or cdecl? Which compiler made the DLL? > float Get_l1_BidPriceSingle(voi

[fpc-pascal] fast integer multiplication and one asm questio

2005-08-02 Thread Pianoman
Hi, the UI32x32To64 function is great but is amazingly short. How can I Specify which varriables in function will be accessed. In this function for example it accesses a and b but source says mull (I don't know why not mul I didnt find mull instruction in any assembly book) and %eax why mull %eax m

[fpc-pascal] Extended float to single and pchar types

2005-08-02 Thread Urbansound
Hi, I have a stdcall reference to a c based dll. called target.dll In c the setup is ... float Get_l1_BidPriceSingle(void* p); The Pascal reference is... function Get_l1_BidPrice(p : pointer) : single; stdcall; external 'target.dll' name 'Get_l1_BidPrice'; The end result is to allow a usage i

Re: [fpc-pascal] Can a program find out how it was started?

2005-08-02 Thread Moz
[EMAIL PROTECTED] said: > Sometimes, though, new users try to start the programs by > double-clicking on the exe file (application icon). When the program > starts, I would like to be able to tell if they have done that, so > that I can present a special error message. One trivial solution is to d

[fpc-pascal] Can a program find out how it was started?

2005-08-02 Thread miller
Greetings from New Zealand, I use fpc to compile programs intended to be run from the command line in a cmd window (Windows 2000, etc). Sometimes, though, new users try to start the programs by double-clicking on the exe file (application icon). When the program starts, I would like to be able to