> I want to just reserve it. I have replaced MEM_COMMIT by MEM_RESERVE. It
> is
> now working fine.
Cool. That sounds like a more common programming idiom ... I'd really worry
about any app which needs to commit 1,000MB Virtual Memory, just to start
up!!!!
> Our application uses M5drvr32.exe to play .dir files. It works in Xp
> without
> any problem.
> In Windows Vista it pops up an error "This program requires at least 3MB
> of
> free virtual memory to run."
> Since we don't have control over M5drvr32.exe, I thought of changing the
> virtual memory programmatically.
> Is there any other way to resolve it without changing the virtual memory?
Hmm, that's a Macromedia file. Where is m5drv32 coming from? Is it installed
as part of Macromedia Director? Or perhaps the Shockwave Player? How are
you running m5drv32? Are you doing a CreateProcess() in your code? What
happens if you run m5drv32 interactively, at a command line, outside your
code (ie just run it as a normal app) do you get the same error?
If you get the same error running m5drv32 interactively, then that's the
problem you need to solve first, before you even try to CreateProcess from
the EXE from code. The error message sounds suspicious to me ... whatever is
causing it is unlikley to be a simple shortage of virtual memory. Rather,
m5drv32 cannot create some runtime data structure, or similar; memory is a
furphy. I recommend you ask Adobe (as the current owners of Director and
Shockwave) or ask in the Macromedia user forums. Director MX 2004 has not
been updated for Vista; and I belive there are some compatibility issues, to
be resolved in the new version of Director to be released later this year.
But I'm just guessing ... ask Macromedia, um, I mean, Adobe:
http://www.adobe.com/cfusion/webforu...cfm?forumid=11
BTW you understand that a user mode application should *not* try to control
a global system resource like the paging file, right? If App A wants a 400MB
paging file and AppB wants a 800MB paging file, what happens when you run
AppA and AppB at the same time? Even if it is a single user system, user
Bill might launch App A and then user Ted might do a Fast User Switching to
his own session and start AppB. Trying to control the page file (or other
global resource) from a single app is the sign of a poor quality program.
Either specify a page file size in the Installation Notes, and let the
system administrator configure the changes manually; or throw up a nice
error message saying "I need a page file of 800MB, I am quitting until you
change it" and then exit. But don't just go in and change it.
Anyway, good luck with the project!
--
Andrew McLaren
amclar (at) optusnet dot com dot au