Re: An old C function problem revisited
- Posted by Jason Gade <jaygade at yahoo.com> Feb 24, 2006
- 504 views
Jason Gade wrote: > > Jonas Temple wrote: > > > > Al Getz wrote: > > > Hi there, > > > > > > > > > Which line in the code does :3631 refer to... is it: > > > > > > cwbUN_EURtnCode = c_func(xcwbUN_DisplayCommandPrompter, > > > {system_handle, prompt, xcommand, > > > xdate_format, xbatch}) > > > > > > > It's the c_func() call. The problem is I don't know which parms is causing > > the problem and I've double and triple checked the parms. > > > > Jonas Temple > > <a href="http://www.yhti.net/~jktemple">http://www.yhti.net/~jktemple</a> > > Make sure you are not getting zero back for the define_c_func call. > > }}} <eucode>xcwbUN_DisplayCommandPrompter = define_c_func(cwbunapi, > "_cwbUN_DisplayCommandPrompter@20", {C_UINT, > C_UINT, C_POINTER, C_POINTER, C_POINTER},C_UINT) > if xcwbUN_DisplayCommandPrompter = -1 then > puts(2, "Couldn't get function handle!\n") -- or message box > end if</eucode> {{{ > > Check the DLL with a tool that lists DLL contents and make sure the name is > right -- I've > used DLL Export Viewer from <a > href="http://www.nirsoft.net">http://www.nirsoft.net</a>. > (Win9x used to have Quickview that did this -- I wish XP did!) Sorry, check for -1, not 0. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.