This site is no longer active and is available for archival purposes only. Registration and login is disabled.

defining a path in Pocket C


defining a path in Pocket C

Postby NYIllustrator » Sep 1, 2001 @ 1:30pm

Ok in order to have a game play a wav file I need to define a path to it in Pocet C. But, I am very bad at how to define a path on the pocket pc because there is nothing like C:/folder...whatever. So lets say the wav file is in a folder called "game" and that folder is in "my documents" folder, what would the exact path be I need to put in?
Image

User avatar
NYIllustrator
pm Insider
 
Posts: 2222
Joined: Jul 17, 2001 @ 1:41am
Location: NY


Re: defining a path in Pocket C

Postby Dan East » Sep 1, 2001 @ 4:24pm

\My Documents\game\whatever.wav<br><br>Remember that in C the backslash is the escape character used to indicate non-printing characters, thus you would have to use two backslashes together for it to map to a plain slash:<br><br>"\\My Documents\\game\\whatever.wav"<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: defining a path in Pocket C

Postby NYIllustrator » Sep 2, 2001 @ 5:35am

Ok I did exactly what you said and when I go to compile it I get this error message..."Error Message: lexical error. (Please make sure source code format is unicode.)" Anybody know what Im doing wrong?
Image

User avatar
NYIllustrator
pm Insider
 
Posts: 2222
Joined: Jul 17, 2001 @ 1:41am
Location: NY


Re: defining a path in Pocket C

Postby Moose or Chuck » Sep 2, 2001 @ 8:50am

It has to be in UNICODE. You can't define paths and stings inline like that. make it: <br>TEXT("\\My Documents\\game\\whatever.wav" )<br>instead of <br>"\\My Documents\\game\\whatever.wav"
Moose or Chuck
 


Re: defining a path in Pocket C

Postby nameless » Sep 2, 2001 @ 11:21am

I seem to remember being able to use forward slashes (/) and thinking to myself "hmmm...".  Perhaps I am a little confused.
nameless
 


Re: defining a path in Pocket C

Postby TBone » Sep 2, 2001 @ 11:24am

Guys, he's using PocketC. I doubt it has problems with Unicode.<br><br>I think I would try the forums over at orbworks.com, davinci.
3V1L L337 H3150
User avatar
TBone
pm Member
 
Posts: 434
Joined: Jul 25, 2001 @ 10:12pm
Location: Fairfax, VA


Re: defining a path in Pocket C

Postby nameless » Sep 2, 2001 @ 12:44pm

Opps.  <br><br>What's PocketC?  Just kidding.<br>How is Pocket C doing now?
nameless
 


Re: defining a path in Pocket C

Postby NYIllustrator » Sep 2, 2001 @ 1:42pm

Well I tried posting in the orbworks forum and got no response i also tried putting "wave text(\\path....ect but got a syntax error when I did that, any other ideas? If not Im stuck and cant continue my game arrgghh!
Image

User avatar
NYIllustrator
pm Insider
 
Posts: 2222
Joined: Jul 17, 2001 @ 1:41am
Location: NY


Re: defining a path in Pocket C

Postby Moose or Chuck » Sep 2, 2001 @ 2:17pm

Instead of the "TEXT()" idea, try just putting an "L" (no quotes) after the source code that's in quotes. I have no experience with PocketC (well, I do, but not really), but those are ways to make the code UNICODE.
Moose or Chuck
 


Re: defining a path in Pocket C

Postby TBone » Sep 2, 2001 @ 2:19pm

Yeah, but Moose, here's my point: he's using a compiler on the platform it compiles for. Not a real binary, we're talking bytecode here. He shouldn't have to worry about Unicode. That's the whole point of PocketC, is that you don't have to mess with the Win32 API.
3V1L L337 H3150
User avatar
TBone
pm Member
 
Posts: 434
Joined: Jul 25, 2001 @ 10:12pm
Location: Fairfax, VA


Re: defining a path in Pocket C

Postby TBone » Sep 2, 2001 @ 2:23pm

davinci, check this out instead. I looked over the WinCE docs portion of the orbworks site, and I think it might help you out.<br><br><br><br>The file will be opened as Unicode/ASCII, but that's transparent to your code. You just need to be able to deal with the stream, its format won't likely matter.<br><br>And for the love of God, now that I think about it, why would he need Unicode to access a path in his program? That's just bloody stupid. Unicode only applies to strings, not relative location.
3V1L L337 H3150
User avatar
TBone
pm Member
 
Posts: 434
Joined: Jul 25, 2001 @ 10:12pm
Location: Fairfax, VA


Re: defining a path in Pocket C

Postby NYIllustrator » Sep 2, 2001 @ 3:48pm

I tried it and it still gives me the same exact error message. All Im trying to do is get a button to play a wav sound when pendown on it. Surley someone knows the exact code Im supposed to be putting in as this is a simple operation, unless the code Im using now is the right code and its giving me this error message for no good reason. I cant believe no one on the orbworks board has responded all these programmers on that board and none know how to make a button play a sound when clicked?
Image

User avatar
NYIllustrator
pm Insider
 
Posts: 2222
Joined: Jul 17, 2001 @ 1:41am
Location: NY


Re: defining a path in Pocket C

Postby Dan East » Sep 2, 2001 @ 6:33pm

What is the exact syntax you are trying to use? The wave "myfile" example you gave is not valid C syntax, if wave is a function (wave("myfile" )  is correct) .<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: defining a path in Pocket C

Postby Moose or Chuck » Sep 2, 2001 @ 9:37pm

He's using PocketC, not C
Moose or Chuck
 


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron