InApp purchase for window phone 8 in cocos2dx

ok … atleast got it to build… when i press the switchbottombar button on the screen the app crashes… with following

???
???
‘TaskHost.exe’ (Win32): Loaded ‘\Device\HarddiskVolume27\Windows\System32\Windows.Storage.dll’. Cannot find or open the PDB file.
‘TaskHost.exe’ (Win32): Loaded ‘\Device\HarddiskVolume27\Windows\System32\PhotosAPI.dll’. Cannot find or open the PDB file.
‘TaskHost.exe’ (Win32): Loaded ‘\Device\HarddiskVolume27\Windows\System32\PhotosServiceClient.dll’. Cannot find or open the PDB file.
First-chance exception at 0x7169E4DD (xamltestComponent.dll) in TaskHost.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x7169E4DD (xamltestComponent.dll) in TaskHost.exe: 0xC0000005: Access violation reading location 0x00000000.

and breaks at

AdControlObj->GlobalCallback->OnBannerReceivedFailed += ref new Windows::Foundation::EventHandler<CompletedEventArgs^>(
[this](Platform::Object^ sender, CompletedEventArgs^ args){
Platform::String ^platform_string = args->ErrorMessage;
const wchar_t* wide_chars = platform_string->Data();
char chars[512];
wcstombs(chars, wide_chars, 512);
pResponseLabel->setString(chars);
});

any clue as to why this is happening???

Hmm… I am not sure how to the remove the access violation errors… Pls help. :frowning:

you can debug in the managed code, not in ui tasks, links: http://social.msdn.microsoft.com/Forums/wpapps/en-US/88211c4d-5774-41ab-ae6b-f447f20f5c8e/how-to-debug-or-print-log-in-the-windows-phone-runtime-components-in-windows-phone-8?forum=wpdevelop, so you can find the errors.

i looked around and somewhere it said that I need to change it to native… thanks… will getback after debugging…

i have commented out whereever = null is set for any variable… but i still get error… will check and get back

thanks

ok should have been checking the autos panel also apart from debug… get an issue with globalcallback->global callback says value is 0x000000000 if i click + sign platform::object and + again __vfptr says unable to read memory … do i make its pointer null !!! :slight_smile:

hi, siddharthshekar, any progress? I tried again and couldn’t found the error. The globalcallback is created in DrawingSurface_Loaded in MainPage.xaml.cs.

oh … on my mainpage.xaml i am getting exception error when i open it up…

same as this link-> http://answers.flyppdevportal.com/answers_adkslbmsbjlewl/categories/winphone/wptools.aspx?ID=7398ad5e-c2fc-40a8-85e7-37e6a6cca834

tried removimg silverlight sdk and reinstalled wp8 sdk… no luck…updating vs2012 to update 4 … i was ignoring this previously… will update and let u know :slight_smile:

i think it has to do with the platform object having a null pointer…

The globalcallback instance is created in code, we can trace it and find the reasons it turns to null, debug in UI or managed code, may not the errors in sdk or environment, attach some pictures in your screen to show me the details. Thanks.

i think the update messedup vs2012… i am in the process of reinstalling vs2012 etc… will post once it is done…

ok… works finally :)… uninstalled and resintalled vs2012, wp8sdk and adsdk… works fine…thanks for the help… the mainpage.xaml works fine now and there is no error…

Wow, it’s really has releationship with the environment… good.

ya seems like it… well also the update stalled inbetween and I cancelled it and that made everything incompatible… so i guess it is better to work with an unupdated version version of v2012…

Guys, do you all got the last tutorial about how to link code from c# to c++ from the C2D guys themselves???

That is the answer I was using it…
Unfortunately I can’t share the code due company rules :frowning:

@pekayatt: Cmon you are the CEO … you make the rules… :stuck_out_tongue:

Anyway… ya got the ad integration to work… with a bit of effort…


here is sample InApp purchase for wp8

thx :slight_smile:

Is this for 2.2.3 or 3.0???

I use for 2.2.3 but it can use for 3.0

Hi,
how do we integrate azure leaderboard for wp8 cocos2dx 2.2.3
thanks

Hi @siddharthshekar
I want to know how you integrate ads in wp8.
Plz share something in details.