Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

File Operations in eVB & Pocket PC  2002

Posted on 2003-12-09
5
Medium Priority
?
4,030 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 1000 total points
ID: 9904105
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

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.
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

783 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