Click here to get back home

DataType Misalignment error

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DataType Misalignment error rajmanish 11-11-2005
Get Chitika Premium
Posted by rajmanish on November 11, 2005, 1:23 am
Please log in for more thread options
Hi all,

I had one application for Smartphone 2002, that I ported for SmartPhone
2003 by following the instruction given in msdn site:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/evc4migration.asp

but on trying to build the same workspace it doesnot give any error
message, but the application doesnot run properly on Smartphone 2003.
I tried debugging on the device, then at one place while allocating
memory to a structure variable I always get "Datatype Misalignment"
error.

I tried fixing the error with the way given in one google thread

http://groups.google.com/group/microsoft.public.smartphone.developer/browse_thread/thread/1e913fa0ef5d1acd/f7b64cb4058b76ba?lnk=st&q=datatype+misaligned&rnum=2#f7b64cb4058b76ba

but couldnot succeed in fixing the error.

Please help in the same.
Thanks in advance.

Regards
Manish Raj



Posted by Matt on November 11, 2005, 5:38 am
Please log in for more thread options
Manish Raj,

I have seen this before, but this was about a year ago when I was doing
the same thing, where I ported a Smartphone 2002 application to
Smartphone 2003. I think this had something to do with cases and
setting variables to different cases. I think I saw this before when I
tried to do the following:

CString ctTemp;
TCHAR buf[50];

ctTemp = buf;

What I needed to do to fix this was:
ctTemp = &buf[0];

I am not 100% sure why this works, but I do know that it works. You
might be casing something incorrectly causing this error.

Matt



Similar ThreadsPosted
Datatype Misalignmnt exception at run time September 16, 2007, 3:38 am
Error 126 August 1, 2005, 3:39 pm
Error September 13, 2005, 10:59 am
Synchronization Error August 18, 2005, 10:37 pm
Error Message September 13, 2005, 10:54 am
SMS_E_PASSWORD error November 19, 2005, 5:34 am
fileclient.sln error February 16, 2006, 11:52 am
WMP Streaming error April 7, 2006, 6:00 am
cant resolve error April 26, 2006, 11:42 pm
Restore error May 23, 2006, 12:11 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap