GUID Implementation

GUID Implementation

Hello All, I am using VC++ 2008 how and where i can keep my GUID ? and where to use Debug ID ? i have a confusion please Let me know ?
15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Dmitry Rizshkov's picture

You do not need to change your GUID for different project configuration (Debug/Release). Just use macro

#ifdef _DEBUG
const ADP_APPLICATIONID myApplicationID(ADP_DEBUG_APPLICATIONID);
#else
const ADP_APPLICATIONID myApplicationID = {{ PUT,YOUR,GUID,HERE }};
#endif

Can ADP_DEBUG_APPLICATIONID still work in Release or is it intended to be used only when the project is compiled in Debug?
The problem I am having is it works only in Debug and I would like to test the funcitonality in Release also. If it is intended to work in Release what could be causing it to act differently?

Thanks

BrianDevArch's picture

hobbes,

ADP_DEBUG_APPLICATIONID is only for use when running the application on your local machine in combination with ATDS. When you submit your application for validation or beta testing (using My Dashboard), you want to replace ADP_DEBUG_APPLICATIONID with your assigned GUID.

Brian

I understand the ADP_DEBUG_APPLICATIONID is only for use when running the applicaiton on my local machine in combination with ATDS. My problem is if my application is compiled in Release and not in Debug ADP_DEBUG_APPLICATIONID will not funciton anymore ( on my local machine using ATDS ) for local testing. Is it only supposed to work in DEBUG?

Thanks
Peter

BrianDevArch's picture

Peter,

You should be able to use ADP_DEBUG_APPLICATIONID regardless of RELEASE or DEBUG mode in Visual Studio 2008. If you are having trouble when switching modes, it is likely a compiler or linker issue. Please provide the errors with screen shots if needed (http://www.imageshack.us).

Brian,

Thank you for your help. It is working now. I had Enable Incremental linking set to NO before and that seems to have caused the problem.

Peter

BrianDevArch's picture

Peter,

You are quite welcome, another ATOM app one step closer to it's new home in the AppUp store.

Andre (Intel)'s picture

Hello,

please check the Documentation which comes with the SDK and the example applications which show you how to use and implement the SDK code.

Best Regards,

Andre B.

Intel® Atom™ Developer Program

BrianDevArch's picture

Vritti,

Your GUID is assigned per Application. You will want to store this GUID as a constant variable in your application. This is the GUID you will use when compiling your application for validation.

When testing, you replace your GUID with the debug GUID (ADP_DEBUG_APPLICATIONID). This allows you to see that your app runs well with the ATOM SDK.

Please have a look at the document installed with your Intel ATOM SDK located here:

C:\Program Files\Intel\Intel Atom Developer Program SDK\0.9\doc\SDK Developer Guide.pdf

BrianDevArch's picture

Great tip Dmitry. That works perfectly for most applications, you would only need to modify the GUID manually if you wanted to Debug with the correct application ID. Happy Holidays and best of luck in your development.

Hi All,
When I drop my GUID in, I get a couple of errors:
error C2552: 'myApplicationId' : non-aggregates cannot be initialized with initializer list
error C2078: too many initializers

has anyone else seen this? Here is an example of the GUID format I use:

com::intel::adp::Application * myApplication = NULL;
const com::intel::adp::ApplicationId myApplicationId = {{0x11111111,0x11111111,0x11111111,0x11111111}};

Thanks,
Tony

BrianDevArch's picture

Tony,

Try something like this:

const ADP_APPLICATIONID myApplicationId = {{ 0x12345678,0x11112222,0x33331234,0x567890ab}};

Worked like a charm. Thanks for saving me so much time :)

BrianDevArch's picture

Your welcome, please feel free to come back and ask questions or share your triumphs.

Login to leave a comment.