Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - m8118

#1
Quote from: MrTAToad on 2013-Aug-13
Activate access to GetLastError() and see what it returns - is it out of memory or some invalid parameter ?

thank you!

SHELLCMD just says "0000 success"
hardyx version crashes and everything freezes so can't print it...

:(
#2
Quote from: hardyx on 2013-Aug-13
I tested in a WinCE emulator and doesn't work. Sorry.

8) Thank you anyway !  :good:

It's a good example on inline!
and thank you for testing it - I would just go around trying silly things...

I understand nobody can help because nobody uses it, and it's not implemented because nobody uses it...

I'll try to make it work a bit more...

help anyone?

#3
Quote from: hardyx on 2013-Aug-12
Try this code:
...

Thank you!

I'm working on it!
(it's fine on win32 - I'm trying to check what I did wrong on WinCE  :( )
#4
Seems SHELLCMD in not implement when building for WinCE.

There was a brief discussion on http://www.glbasic.com/forum/index.php?topic=9387.0

(I believe this is the way to make a formal bug report...)

#5
Quote from: hardyx on 2013-Aug-09
You can use INLINE code to implement yourself using WinCE API Calls. :)

http://stackoverflow.com/questions/4012258/how-to-use-shellexecuteex-to-run-an-application-on-windows-ce

I can't do it :( I'm not advanced enough...
"This command is for advanced users who know what they're doing!"

I don't know:
- how to write the declaration of the C function to call
- if I need to include something else or even what
- how to conditionally compile depending on the platform
- how to use the example hardyx give

Can anybody help? This should be straight forward...
Otherwise I'll have to abandon my simple project...

this is what I got (there are some obvious initialization not included here):

Code (glbasic) Select

IMPORT "C" int __stdcall CreateProcess(char* text, char* caption, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8);

//bool CreateProcess(
//  LPCWSTR pszImageName,
//  LPCWSTR pszCmdLine,
//  LPSECURITY_ATTRIBUTES psaProcess,
//  LPSECURITY_ATTRIBUTES psaThread,
//  bool fInheritHandles,
//  DWORD fdwCreate,
//  LPVOID pvEnvironment,
//  LPWSTR pszCurDir,
//  LPSTARTUPINFOW psiStartInfo,
//  LPPROCESS_INFORMATION pProcInfo
//);


FUNCTION callProg: prog$

exec$ = prog$
IF envDevice$ = "WINCE"
INLINE
execOK = CreateProcess(exec_Str, "", 0,0,0,0,0,0,0,0);
ENDINLINE
execReturn = "?"
ELSE
execOK = SHELLCMD ( exec$, TRUE, TRUE, execReturn)
ENDIF

ENDFUNCTION


compiling on win32 to win32
gpc_temp1.o:gpc_temp1.cpp:(.text+0xd41): undefined reference to `_CreateProcess@40'
*** FATAL ERROR - Please post this output in the forum

compiling on win32 to wince
/cygdrive/c/Users/a/AppData/Local/Temp/ccav2y8K.o(.text+0xaa8):gpc_temp1.cpp: undefined reference to `CreateProcess'
*** FATAL ERROR - Please post this output in the forum
#6
Quote from: hardyx on 2013-Aug-09
You can use INLINE code to implement yourself using WinCE API Calls. :)

http://stackoverflow.com/questions/4012258/how-to-use-shellexecuteex-to-run-an-application-on-windows-ce

Ah! Ah! I'll definitively look into it this weekend. Thank you!
#7
Quote from: MrTAToad on 2013-Aug-09
Sounds like it isn't implemented then!

ahhhhhhhhhh!

Should have tested before putting the money up!
Should have tested before spending hours and hours developing!

last this issue was raised: by Kitty Hello

Quote
Re: ShellEND on Pocket PC
« Reply #1 on: 2008-Oct-06 »
Quote
Oh. Shellcmd and shellend are both not in WinCE. I'll fix it for V6.

:P
#8
Quote from: hardyx on 2013-Aug-09
Try to execute a little program, because could be you can't execute a big program. In Windows CE you can run only 32 processes (including system and drivers) and you have 32 Mb for process limit, no matter the memory you have available in the device.

Than you!
Didn't know...
but can't be that, that program does run when called directly or from ceFFM and the emulator is setup with a lot of memory.

here are two small GLBasic programs.
smallCallee runs correctly when called directly
smallCaller runs and prints 0 for ok and 0 for rv


Code (glbasic) Select

// --------------------------------- //
// Project: smallCaller
// Start: Thursday, August 08, 2013
// IDE Version: 10.283


// SETCURRENTDIR("Media") // go to media files


ok = SHELLCMD("\\Storage Card\\smallCallee.exe", TRUE, TRUE, rv)
PRINT "ok = " + ok, 20, 20
PRINT "rv = " + rv, 20, 30
SHOWSCREEN
MOUSEWAIT


Code (glbasic) Select

// --------------------------------- //
// Project: smallCallee
// Start: Thursday, August 08, 2013
// IDE Version: 10.283


// SETCURRENTDIR("Media") // go to media files

PRINT "I am smallCalle!", 100, 100
SHOWSCREEN
MOUSEWAIT
#9
thank you.

I tried forward, backward, double, quotes, no quotes... anything I could think of... nothing worked  :(

Anybody made SHELLCMD work on wince?
#10
I'm stuck - can't find any examples or confirmation that SHELLCMD on wince works, and I can't make it work.

I have:
Code (glbasic) Select


GLOBAL execOK#
GLOBAL execReturn#

execOK# = SHELLCMD ( "\"\\Storage Card\\Desnav\\DESNAV.exe\"", TRUE, TRUE, execReturn#)

execOK# is always 0 and nothing happens.
I tried this on the microsoft emulator and my car DVD/GPS chinese unit.

On windows 7 I'm able to start notepad with execOK# = SHELLCMD ( "notepad", TRUE, TRUE, execReturn#)

Any ideas?
I know nothing about wince - I shouldn't need to, that why I got GLBasic  ;/

(ah! INSTR also gives me problems... I'll make another post after a search and more testing)