Solved

File Operations in eVB & Pocket PC  2002

Posted on 2003-12-09
5
4,019 Views
Last Modified: 2013-12-27
Hello Experts..
Let me explain the problem first. It may not be clear without this long intro.
I have developed a strategy game in eVB using ATL based COM component in eVC.
Whole game logic is implemented in eVB where COM is used only for declaring objects since evb lacks this ability. 3 objects are declared in COM - say, PlanetObj, PlayerObj, ShipObj.
and I'm creating arrays of these objects in eVB using CreateObject() function. PlayerObj has 69 Properties, PlanetObj has 44 Properties, and ShipObj has 19 properties. And object arrays are declared as
Dim Planets(58) as PlanetObj , Players(3) as PlayerObj, Ships(7) as ShipObj.
And problem is not here. the game is working smooth and fine, so far.

But Now I've to implement a 'save game' option for middle way exit, and to reopen at a later time. for this I've tried 'File control' for serializing these object properties.

First I tried textmode writing using inbuilt methods. 'WriteFields' method properly wrote all the stuff to a text file which can be viewed in any text editor. But when I retrived it using 'InputFields' It gave all stuffs in a variant array, but all the string properties are not the same which I saved and viewd in text file.

for example :- planets(0).name was "Earth" when I saved,
but it gives strange values like "Width" , "GetTypeInfo" , "Arial"  etc on retrieval.

And when I tried binary mode- get & put file operations of 'File control' it solves the string field problems, but It doesnt save the whole 3000 above variables in a single binary file. It save and retrieves first half portion correctly. but the variables saved towards the last portion of the file are not the same values as I saved.
What could be the problem with it ?
Could I able to explain the problem correctly !!!!! ?
Anyone there to shred some light on these topics ?
(Please dont suggest any 3rd party tools. )

Thanx in advance

Unni.K.S
0
Comment
Question by:unni_bcanti
  • 3
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 total points
Comment Utility
0
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
0
 

Author Comment

by:unni_bcanti
Comment Utility
Thanx..
Let me tryout the first link.
I'm using eVB3 , eVC3 & PocketPC2002 SDK.

And I think eVC 4 is exclusively for PPC 2003. right?
I'm targetting PPC2002 also for my game.
0
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
eMbedded Visual Tools 3.0
This comprises eMbedded Visual Basic (eVB) 3.0 and Visual C++ (eVC) 3.0 which are based on the Visual Studio 6.0 development environment and allow you to write Windows CE applications, including applications for Pocket PC 2002 and Handheld PC 2000, using Visual C++ or Visual Basic. Any Windows CE SDK, such as the Pocket PC 2002 SDK, can be installed, so eVB and eVC can develop applications for any type of Windows CE device.
      SDKs do vary in the tool support they provide but, for example, the Pocket PC 2002 SDK allows applications to be developed using a tailored version of MFC (Microsoft Foundation Classes) and ATL (ActiveX Template Libraries). The eVB language is more closely related to VBScript than Visual Basic, and is not currently supported by the Smartphone 2002 SDK.

eMbedded Visual C++ 4.0
The latest version of eVC is used to produce applications for Windows CE .NET devices. This allows ‘unmanaged’ native code applications to be produced, whereas the .NET Compact Framework produces applications using MSIL ‘managed code’. eVC 4.0 is expected to co-exist with the .NET Compact Framework as it provides complete access to the underlying Windows CE .NET API functions.

0
 

Author Comment

by:unni_bcanti
Comment Utility
I could develop a solution for the file writing problem using 'devbuzz' sample.
I was writing and reading using ansi strings.
Unicode mode writing & reading solved my problem.
I can give these points to you.

Thanks mikal.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now