RE: win32lib dependancy
- Posted by Patrick.Barnes at transgrid.com.au Nov 28, 2002
- 403 views
Thank you. I need 25 less files now. It would be nice if that was built in to the windows version of chdir(). ======================= Patrick Barnes Information Systems Group 201 Elizabeth St, Sydney Patrick.Barnes at tg.nsw.gov.au Ext: 91-3583 Ph:(02) 9284-3583 Mob: 0410 751 044 -----Original Message----- From: Euman [mailto:euman at bellsouth.net] Sent: Thursday, 28 November 2002 14:16 To: EUforum Subject: Re: win32lib dependancy Hey Patrick, How about this snippet that uses no (0) include files: global function allocate_string(sequence s) atom mem mem = machine_func(16, (length(s) + 1)) if mem then poke(mem, s & 0) end if return mem end function atom kernel32 kernel32 = machine_func(50, "kernel32.dll") constant SetCurrentDirectory = machine_func(51, {kernel32, "SetCurrentDirectoryA", {#01000004}, 0} ) atom str str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\") c_proc(SetCurrentDirectory,{str}) machine_proc(17, str ) Euman euman at bellsouth.net ----- Original Message ----- From: <Patrick.Barnes at transgrid.com.au> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, November 27, 2002 9:45 PM Subject: win32lib dependancy : : My .exw proggy only contains one part that uses win32lib: : : ----==========Set the working directory=========---- : constant SetCurrentDirectory = registerw32Procedure( kernel32, "SetCurrentDirectoryA", {C_POINTER} ) : atom str str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\") : w32Proc( SetCurrentDirectory, {str} ) free( str ) : ----============================================---- : : Because of that one snippet, I have to have win32lib.ew, misc.e, machine.e, etc etc etc... all these include files, in the folder too. : How can I redo the above without using win32lib? : I tried looking at the win32lib functions, but there's so many constants and things I don't understand there, I wouldn't know where to begin. : : David, Derek... can you write the above snippet without using win32lib calls? : : : Very confused. : ======================= : Patrick Barnes : Information Systems Group : 201 Elizabeth St, Sydney : Patrick.Barnes at tg.nsw.gov.au : Ext: 91-3583 : Ph:(02) 9284-3583 : Mob: 0410 751 044 : : : *********************************************************************** : : : : : *********************************************************************** : : : : : *********************************************************************** ***********************************************************************