Re: Wrong result from MemHandleSize?

2008-01-20 Thread David Linker

See below


  loc = MemHandleLock(h);
   strsize = StrLen(loc);
//strsize = 288628 again wrong, but at least it is consistent!


This makes no sense at all, and suggests a bug with your code. Pilrc
always puts the trailing nul on string resources, and StrLen should
not fail like that. How is the strsize variable declared?


loc is a char *, and strsize is long int.
There is a trailing null, as shown below.



   loc = source;
   while (*loc != 0) {i++; loc++;}
// i=3283  this is the correct value


I can't comment on this because I don't know how the variable source
got declared and assigned.

Sorry about the line loc=source.  Just delete it, it was an erroneous  
copy and paste.



It would be better if you could post a complete, compilable code
snippet, including all variable declaration and initialization.


void showProblem() {
MemHandle h;
long int strsize;
char * loc;

h = DmGet1Resource('tSTR', 2000);
strsize = MemHandleSize(h); //Yields incorrect value ~ 288628
loc = MemHandleLock(h);
strsize = StrLen(loc); //Also gives the same wrong value
strsize = 0;
while (*loc != 0) strsize ++; loc++;} //Gives correct value of 3283
}




--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Wrong result from MemHandleSize?

2008-01-20 Thread Roger Stringer

At 03:15 AM 1/20/2008, you wrote:

Subject: Re: Wrong result from MemHandleSize?
From: David Linker [EMAIL PROTECTED]
Date: Sun, 20 Jan 2008 00:00:06 -0800
X-Message-Number: 5

void showProblem() {
MemHandle h;
/*long int*/ UInt32 strsize;
Char * loc;

h = DmGet1Resource('tSTR', 2000);

DisplayFatalErrorIf (!h, Can't find #2000);

strsize = MemHandleSize(h); //Yields incorrect value ~ 288628
loc = (Char *)MemHandleLock(h);

DisplayFatalErrorIf (!loc, Can't lock #2000);

strsize = 0;
while (*loc != 0) strsize ++; loc++;} //Gives correct value of 3283
}


What you are doing should work and always works for other people.

I made some minor changes to the code above (for example: use UInt32 
here instead of long int), especially since you have a long unsigned 
value not a long int anyway.


And you should ALWAYS put in code to trap unexpected but possible 
errors such as the resource not being found and not being able to lock it.


So the strong suspicion is the problem is your resource!


Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


virtual expansion slot

2008-01-20 Thread peibull
I need to add a virtual expansion slot to the palm device (i.e. the slot won't 
be actually there). My targets are Palm OS 5 devices.
Is that possible? Thanks!
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: Treo 680 simulator

2008-01-20 Thread Geetha Arasu


 
Thanks! For ur reply..
I am using Treo 680 simulator.. could u tell where can I find RMB? What is
it actually mean?
 
-Original Message-
From: %%email.bounce%% [mailto:%%email.bounce%%] On Behalf Of Borszczuk
Sent: Friday, January 18, 2008 7:53 PM
To: Palm Developer Forum
Subject: Re: Treo 680 simulator

Geetha Arasu wrote:
 hi 
  i have the following questions
 1. i am using treo 680 simulator.. i wanted the simulator to connect to
the
 internet(eg to browse google.com)..so is there any configuration that has
to
 be done in the simulator to access the net?

RMB over simulator window and: Settings - Communications - Redirect NetLib
calls...

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe,
please see http://www.access-company.com/developers/forums/



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: Treo 680 simulator

2008-01-20 Thread Geetha Arasu


Thanks Ben!
 

-Original Message-
From: %%email.bounce%% [mailto:%%email.bounce%%] On Behalf Of Ben Combee
Sent: Monday, January 21, 2008 1:34 PM
To: Palm Developer Forum
Subject: Re: Treo 680 simulator

On Jan 20, 2008 8:58 PM, Geetha Arasu [EMAIL PROTECTED] wrote:



 Thanks! For ur reply..
 I am using Treo 680 simulator.. could u tell where can I find RMB? What is
 it actually mean?

Hit the Right Mouse Button to bring up the context menu.



 -Original Message-
 From: %%email.bounce%% [mailto:%%email.bounce%%] On Behalf Of Borszczuk
 Sent: Friday, January 18, 2008 7:53 PM
 To: Palm Developer Forum
 Subject: Re: Treo 680 simulator

 Geetha Arasu wrote:
  hi
   i have the following questions
  1. i am using treo 680 simulator.. i wanted the simulator to connect to
 the
  internet(eg to browse google.com)..so is there any configuration that
has
 to
  be done in the simulator to access the net?

 RMB over simulator window and: Settings - Communications - Redirect
NetLib
 calls...

 --
 For information on using the ACCESS Developer Forums, or to unsubscribe,
 please see http://www.access-company.com/developers/forums/



 --
 For information on using the ACCESS Developer Forums, or to unsubscribe,
please see http://www.access-company.com/developers/forums/


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe,
please see http://www.access-company.com/developers/forums/



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


HTTP request

2008-01-20 Thread Geetha Arasu

1. Any one have idea on sending http request  ?
2. Is there Net library in the treo 680 simulator? if not is there any way
to load the library?

Any suggestions



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/