Authentication Code

Authentication Code

I am getting authorization failure Description of code: There is a function InitInstance() which is called when the application is initialized. This function creates an object named 'pSampleApplication' of class 'SampleApplication'. The production ID of the application is passed into this class. The debug ID of application is used instead of the production ID during development. The object then calls the BeginEvent(). If it returns some value then 'if' block is executed and the code flow reaches to the actual code of the application. In the other case the 'else' block is executed and the message "Application authorization failed" is displayed. Please ask me if you have any doubt/query in the code. Thanks, Khan
Khan
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Khan,

Your logic seems correct. You will want to change the debug GUID to your apps assigned GUID when submitting for validation.

Please feel free to paste your initialization code if you are unsure.

Hi Brain,

Below is the code kindly help me out.

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;

hInst = hInstance; // Store instance handle in our global variable

hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

SampleApplication* pSampleApplication = NULL; // the class called is written below.
try {
pSampleApplication = new SampleApplication(2); /* Create a new SampleApplication object and store 2 in the member variable */

pSampleApplication->BeginEvent();

} catch (AdpException& e) {
wcout << L"Caught exception in application: " << e << endl;
}

if (pSampleApplication)
{}
else
{
MessageBox(0,TEXT("Application authorization failed."),TEXT("Message: ERROR"),MB_ICONEXCLAMATION);
exit(1);
}// on the Sample Application and all components

if (!hWnd)
{
return FALSE;
}

/*Actual Code Starts here*/
return TRUE;
}

//----------------------------------------------------------------------------
//
// File: SampleApplication.cpp
//
// Contents: Sample Application header file
//----------------------------------------------------------------------------

#include "stdafx.h"
#include "SampleApplication.h"
#include

// Use the DEBUG_ID when developing an application, but comment the above and replace
// the following with a valid ID obtained from the Developer Portal before submitting

ApplicationId SampleApplication::id(0x10D11310,0x829B4A79,0xBEB41CDF,0xCDFAB640);//Production ID

SampleApplication::SampleApplication(int dataIn) : Application(id) { // use the ApplicationId from directly above
this->dataLocal = dataIn; // set the local member variable dataLocal using the value of dataIn
};

void SampleApplication::PrintAuthorizationStatus() {
cout << "Application authorization status for " << (string) id << ": ";
cout << Application::GetAuthorizationStatus() << endl;
};

int SampleApplication::GetData() {
return dataLocal; //return the contents of the dataLocal member variable
};

Khan

Can anybody help me with with regars to above code what is I need to correct??

Khan

Khan,

Authorization failure is expected if you are using the GUID for your application. Try using the DEBUG GUID provided in the ATOM SDK and let met know if that solves your problem. Remember to change it back to your applications GUID before submitting for validation.

Brian,
Thanks. We are able to run the application successfully on the development environment [with DEBUGID]. However when we submitted the application for approval they rejected the same stating that the application is not using the authorization. Following is the reason they specified:

Failure Reason: ILU03 - Application launch

Additional Comments: application does not appear to be compiled with the beta SDK. Please see http://appdeveloper.intel.com/en-us/blog/2009/12/23/five-things-you-shou... for more information on how to make sure your app is ready to submit.

Check the failure code against the Intel(R) Application/Component Suitability Guidelines
and Validation Criteria document. This document lists the error codes and the associated
tests that were run on your application. Additional comments provided may help narrow
down the specific failure(s).

We compiled it with the beta 2 SDK " Intel Atom Developer Program SDK (Beta) 2 for Windows"

Regards

Hunka,

When you submited your MSI, was it using the DEBUG GUID or your assigned GUID. If it was the DEBUG GUID, that would explanio the failure.

At this stage I would re-submit it to them, as this may have been a case where the wrong MSI was uploaded. Be sure to rename your MSI prior to uploading to something like "Installer_2.msi"

Leave a Comment

Please sign in to add a comment. Not a member? Join today