1. Re: edita 0.1.6/WM_COPYDATA experts?

Hi there Pete,

First off, Microsoft recommends treating the pointer passed in the
COPYDATA struct to be 'read only' by the called process.  Unfortunately
i dont know the reason behind them including this 'fact' in the
documentation so i cant say when it will work otherwise.

Second, the source of the filename problem might be because Eu's
'current_dir()' function does not always work as expected.
I've uploaded a fix for this quite a while back i think it was
called 'GetCurrentDir' but i cant find it now so here's the
file:


--GetStartupDir.ew--------------------------------------

sequence CommandLine,SUDir

CommandLine=command_line()

SUDir=""

if length(CommandLine)>1 then
  CommandLine=CommandLine[2]
  for k=length(CommandLine) to 1 by -1 do
    if CommandLine[k]='\\' then
      SUDir=CommandLine[1..k]
      exit
    end if
  end for
end if

global function GetStartupDirectory()
  return SUDir
end function

----------------------------------------------

The idea is to:
1.  include the file early in the program.
2.  call 'GetStartupDirectory()' as soon as the program opens
    in place of where you would want to call 'current_dir()'.

I think this will help the XP problem, but even if it doesnt
it's a good idea to use GetStartupDirectory() anyway because
you never know if your user might open the exe with a mouse
drop action.


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu