Solved

File Operations in eVB & Pocket PC  2002

Posted on 2003-12-09
5
4,022 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
ID: 9904105
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 9904336
0
 

Author Comment

by:unni_bcanti
ID: 9910008
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
ID: 9912076
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
ID: 9918938
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Progress means simplifying, not complicating. Bruno Munari Preface How to detect the name of the internal storage or an SD-card on Windows Mobile device from the desktop application? I got this question, when I was working on a PC applicati…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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