Calling a Blitz exe from Vbasic 6.0

Blitz3D Forums/Blitz3D Programming/Calling a Blitz exe from Vbasic 6.0

caviedes(Posted 2008) [#1]
I have created a exe in blitz, it runs very well, except when it is called from "shell" i.e x=Shell("C:\MVPU\api.exe", 1)
function of a VBasic 6.0 application (Memory acces violation), any idea?

Francisco


IPete2(Posted 2008) [#2]
Try telling blitz where your exe is by using the changedir call like this:

ChangeDir = "c:\myfolder"


IPete2.


caviedes(Posted 2008) [#3]
Nop, it crashes again even from a blitz3D application!
"Illegal memory address"


IPete2(Posted 2008) [#4]
Caviedes,

The information you provide ... well it's not really enough to go on - you are not making it easy for us to help you.

For example, which version of B3d are you using and which version of Windows? and what does...
even from a blitz3D application!
"Illegal memory address"


mean exactly?

Come on give us something we can think about...

Have you put the B3d.exe and all associated media in
the same folder as the vB 6.0 app?

IPete2.


caviedes(Posted 2008) [#5]
I have made a FTP application in Visual Basic 6.0 which last command is to execute an editor in Blitz3D, but every time Blitz send me a “Memory access violation” or “Illegal Memory address” message. Whenever I start the editor (by conman line, double click, or direct access) works very well. Now, yesterday I cut and paste a couple of code snippets from the community to try to start the editor from other Blitz3D generated program and Had the same results; it crashes.
Sorry for may bad English
Thanks in advance for your help,


IPete2(Posted 2008) [#6]
Caviedes,

OK - let's try to find where abouts the issue is:

(1) The b3D works fine on its own.
Does it have to load any media?
Is it a B3D windowed application of full screen?
Which error does it show at which time? MAV usually means B3d cannot find media you are asking for.

Try putting this is right at the start of the B3d before anything else...

Graphics3D 800,600,32,2
SetBuffer BackBuffer()
Text 0,0,"I work okay..."
Text 0,20,"Current directory = "+CurrentDir$()
Flip
WaitKey()

re-compile your B3d application and try again and see if at least b3d starts or not.

if that doesn't work remove just the first line and try again i.e. remove 'Graphics3D 800,600,32,2'

What happens then?

IPete2.

I am at work for another hour (or everyday) or so you can email me at peter@...


nerdy_kid(Posted 2008) [#7]
Try adding your program to Data Execution Prevention's exception list.