RE: Emulator OR Pilot?

2008-05-28 Thread Rick Gadbois
thanks JB...
-
> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??
-
#if EMULATION_LEVEL != EMULATION_NONE
// You are on the emulator
#else
// You are on a device
#endif




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


RE: Emulator OR Pilot?

2008-05-28 Thread Rick Gadbois
thanks chris

> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??

Boolean inposer;
DWord temp;

if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
else inposer=true;


/* Chris Faherty <[EMAIL PROTECTED]> */


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


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


Re: Emulator OR Pilot?

2008-05-28 Thread Adam Wozniak
JB Parrett wrote:

> on 8/24/00 10:06 AM, Rick Gadbois at [EMAIL PROTECTED] wrote:
>
> > Is there a way to tell from within your program if it is running in the
> > emulator or a real palm pilot??
>
> #if EMULATION_LEVEL != EMULATION_NONE
> // You are on the emulator
> #else
> // You are on a device
> #endif
>

Those are compile time directives for conditional inclusion of code.  I
don't think that's what Rick was after.  As I understood the question,
he has one PRC and he wants it to be able to tell, at run time,
whether it is in the emulator or in a real palm pilot.

Perhaps looking into the behavior of the various Host*() functions
might lead you to a solution.  Reading the Emulator docs might not
hurt *grin*.

--
Adam Wozniak Chief Architect
 Surveyor Corporation
[EMAIL PROTECTED]4548 Broad Street
[EMAIL PROTECTED]  San Luis Obispo, CA 93401




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


RE: Emulator OR Pilot?

2008-05-28 Thread Rick Gadbois
Yes Adam you are right, but as far as the emulator documentation and/or
header files, maybe I didn't look hard enough but.. I didn't find anything
like what what Chris Faherty suggested (and it worked), the following:

if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
else inposer=true;

thanks for the input folks.

JB Parrett wrote:
> on 8/24/00 10:06 AM, Rick Gadbois at [EMAIL PROTECTED] wrote:
>
> > Is there a way to tell from within your program if it is running in the
> > emulator or a real palm pilot??
>
> #if EMULATION_LEVEL != EMULATION_NONE
> // You are on the emulator
> #else
> // You are on a device
> #endif
>

Those are compile time directives for conditional inclusion of code.  I
don't think that's what Rick was after.  As I understood the question,
he has one PRC and he wants it to be able to tell, at run time,
whether it is in the emulator or in a real palm pilot.

Perhaps looking into the behavior of the various Host*() functions
might lead you to a solution.  Reading the Emulator docs might not
hurt *grin*.

-



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


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


Re: Emulator OR Pilot?

2000-08-28 Thread Ken Krugler

>Subject: Re: Emulator OR Pilot?
>From: Chris Faherty <[EMAIL PROTECTED]>
>Date: Thu, 24 Aug 2000 11:06:57 -0400 (EDT)
>X-Message-Number: 33
>
>On 24-Aug-2000 Rick Gadbois wrote:
>
>  > Is there a way to tell from within your program if it is running in the
>  > emulator or a real palm pilot??
>
>Boolean inposer;
>DWord temp;
>
>if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
>else inposer=true;

If you know your app only runs on 3.0 or later devices, you can use 
the HostControl.h calls, for example:

inPoser = HostGetHostID() == hostIDPalmOSEmulator;

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Emulator OR Pilot?

2000-08-24 Thread JB Parrett

on 8/24/00 1:29 PM, Danny Epstein at [EMAIL PROTECTED] wrote:

> "JB Parrett" <[EMAIL PROTECTED]> wrote in message
> news:22175@palm-dev-forum...
>> #if EMULATION_LEVEL != EMULATION_NONE
>> // You are on the emulator
> 
> Correction: You are on the simulator.
> 
>> #else
>> // You are on a device
>> #endif
> 
> The term EMULATION_LEVEL is misleading. We now use the term "simulator" to
> refer to this. The simulator is a version of Palm OS that's compiled as a
> static library for Mac OS.

Good catch: I wasn't fully awake this morning when I grabbed those lines
from an old project (back in the days when I used the Simulator because the
Emulator wasn't as handy as it is now).

I'd use the Ftr Manager approach suggested earlier by Chris Faherty:

if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature)
// Not on POSE

JB

--
JB Parrett [EMAIL PROTECTED]
Palm, Inc. 

We grow a lot faster than trees,
so we miss a lot of stuff. - B. Andreas


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Emulator OR Pilot?

2000-08-24 Thread Danny Epstein

"JB Parrett" <[EMAIL PROTECTED]> wrote in message
news:22175@palm-dev-forum...
> #if EMULATION_LEVEL != EMULATION_NONE
> // You are on the emulator

Correction: You are on the simulator.

> #else
> // You are on a device
> #endif

The term EMULATION_LEVEL is misleading. We now use the term "simulator" to
refer to this. The simulator is a version of Palm OS that's compiled as a
static library for Mac OS.
--
Danny Epstein
OS Engineer, Palm Inc.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Emulator OR Pilot?

2000-08-24 Thread Rick Gadbois

Yes Adam you are right, but as far as the emulator documentation and/or
header files, maybe I didn't look hard enough but.. I didn't find anything
like what what Chris Faherty suggested (and it worked), the following:

if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
else inposer=true;

thanks for the input folks.

JB Parrett wrote:
> on 8/24/00 10:06 AM, Rick Gadbois at [EMAIL PROTECTED] wrote:
>
> > Is there a way to tell from within your program if it is running in the
> > emulator or a real palm pilot??
>
> #if EMULATION_LEVEL != EMULATION_NONE
> // You are on the emulator
> #else
> // You are on a device
> #endif
>

Those are compile time directives for conditional inclusion of code.  I
don't think that's what Rick was after.  As I understood the question,
he has one PRC and he wants it to be able to tell, at run time,
whether it is in the emulator or in a real palm pilot.

Perhaps looking into the behavior of the various Host*() functions
might lead you to a solution.  Reading the Emulator docs might not
hurt *grin*.

-



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Emulator OR Pilot?

2000-08-24 Thread Adam Wozniak

JB Parrett wrote:

> on 8/24/00 10:06 AM, Rick Gadbois at [EMAIL PROTECTED] wrote:
>
> > Is there a way to tell from within your program if it is running in the
> > emulator or a real palm pilot??
>
> #if EMULATION_LEVEL != EMULATION_NONE
> // You are on the emulator
> #else
> // You are on a device
> #endif
>

Those are compile time directives for conditional inclusion of code.  I
don't think that's what Rick was after.  As I understood the question,
he has one PRC and he wants it to be able to tell, at run time,
whether it is in the emulator or in a real palm pilot.

Perhaps looking into the behavior of the various Host*() functions
might lead you to a solution.  Reading the Emulator docs might not
hurt *grin*.

--
Adam Wozniak Chief Architect
 Surveyor Corporation
[EMAIL PROTECTED]4548 Broad Street
[EMAIL PROTECTED]  San Luis Obispo, CA 93401



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Emulator OR Pilot?

2000-08-24 Thread Rick Gadbois

thanks chris

> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??

Boolean inposer;
DWord temp;

if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
else inposer=true;


/* Chris Faherty <[EMAIL PROTECTED]> */


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Emulator OR Pilot?

2000-08-24 Thread Rick Gadbois

thanks JB...
-
> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??
-
#if EMULATION_LEVEL != EMULATION_NONE
// You are on the emulator
#else
// You are on a device
#endif



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Emulator OR Pilot?

2000-08-24 Thread Chris Faherty

On 24-Aug-2000 Rick Gadbois wrote:

> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??

Boolean inposer;
DWord temp;

if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
else inposer=true;


/* Chris Faherty <[EMAIL PROTECTED]> */


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Emulator OR Pilot?

2000-08-24 Thread JB Parrett

on 8/24/00 10:06 AM, Rick Gadbois at [EMAIL PROTECTED] wrote:

> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??

#if EMULATION_LEVEL != EMULATION_NONE
// You are on the emulator
#else
// You are on a device
#endif


--
JB Parrett [EMAIL PROTECTED]
Palm, Inc. 

We grow a lot faster than trees,
so we miss a lot of stuff. - B. Andreas


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Emulator OR Pilot?

2000-08-24 Thread Andrew Lathrop

I think so.  I remember seeing some code in the includes that mentioned if
emulated vs real device.  (I think)  Dig around in the includes, but i think
it can be done.
Rick Gadbois <[EMAIL PROTECTED]> wrote in message
news:22163@palm-dev-forum...
>
> Is there a way to tell from within your program if it is running in the
> emulator or a real palm pilot??
>
>
> thank you...rickG
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/