>       Warrick Wilson wrote:
>       > Won't n be 0 by the default compiler initialization behavior?
>       
>       Where did you hear about that?
>       
>       --
>       Rob
> 
> 
> Rob - My apologies. You're right; Delphi DOESN'T work like that. I was
> confusing it with something else I'd been working on today. Did a quick test
> and a local uninitialized integer variable had a random integer value (and
> did generate a "may not be initialized" warning). An uninitialized unit
> level integer variable had a value of 0 in every quick test I tried.
> 
> But I suspect your point is that good programming practice would be to
> initialize every variable explicitly before using it.

>

Yep your right, I should have initialized n to 0 prior to any use, but as the 
first PostMessage call is made as a result of an error condition (ie Param1 is 
nil) the actual value of n is immaterial (I should have used 
PostMessage(hWnd_BROADCAST, fWakeUp, 0, 0); instead).

I'm fairly sure that the problem is with the method of passing parameters from 
Crystal Reports, as Param1 <> nil, but the value returned by 
Param1.Parameter.ParamInteger is 0 regardless of the value assigned in the 
Report (the dll is called from within a Crystal Report as Formula = 
LaunchApplication(100)).


Paul Bennett

Experience is something you don't get until just after you need it. 


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze

Reply via email to