Solved

File Operations in eVB & Pocket PC  2002

Posted on 2003-12-09
5
4,023 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

763 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