How to read playing card bitmaps from pegcards.dll?

  • Thread starter Thread starter Martin Bryant
  • Start date Start date
M

Martin Bryant

How can you read the embedded card bitmaps from within the pegcards.dll file
from a C# .Net program?

The pegcards.dll is not a .Net assembly so I guess it'll need some API calls
to load the DLL and interrogate it?!

Any help greatly appreciated :-)
 
I have been working on a Basic Card Playing logic in the last few months.
In the next few days I will continue this, when finished with some Beta
Tests.
At the moment the basic Graphic Layout as well as Player Logic (Players /
Deck / Spent Cards),
Drag and Drop (á la Solitair) are finished and work both on PC as well as
Compact (with OnSize reaction on PC) keeping track of who played what where.
One User and up to 3 Computer Players, Dealer (when needed) and Stack in the
middle with up to 2 Places to store Cards that Players will recieve after
bidding is done.
Everything has been Documented up to this Point (XML-Documentation with Help
file as result).
The next thing to do is the reaction of the Computer Player to the User
Players move.

As to the Cards.dll : I started with this and the Class can read and Place
the Cards on the PC.
These Fuctions fail on Compact due to missing public Funtions in
pegcards.dll. From the Information recieved here
there is no ways to use this dll.
/// <list type="table">
/// <item>
/// <description>Support for Cards.dll</description>
/// </item>
/// </list>
/// <list type="bullet">
/// <item>
/// <description>PC only due to no public Functions for pegcards.dll in
WindowsCe</description>
/// <para>- I tried this on WinCe and and it failed.</para>
/// </item>
/// </list>

Therefore I have created (both for PC-Format as well as Compact-format) the
needed Cards.
Since I also support Languages their are not only the Standard Card.dll /
pegcards.dll but also
Cards of my own disign for English, German, Old-German, Polish and so called
Internationl (1-13).

The basic idea behind this Concept to to use a derived Class for a specfic
Games, with Cards/Players Class doing all basic work needed by
all Games.

If you are interested in this I will send you the Doc File (and Demo) per
E-Mail. I am not planning to make this C# source public.

Mark Johnson, Berlin Germany
(e-mail address removed)
 
Martin Bryant said:
How can you read the embedded card bitmaps from within the pegcards.dll file
from a C# .Net program?

The pegcards.dll is not a .Net assembly so I guess it'll need some API calls
to load the DLL and interrogate it?!

Any help greatly appreciated :-)
Martin,

I have never tried pegcards.dll, but cards.dll (on the desktop) has some
functions to do this for you. They were called cdtInit, cdtDraw, cdtDrawEx,
cdtTerm, cdtAnimate. Do these exist in pegcards.dll ? If they do then use
the documentation (not official) for cards.dll which can be found with a
quick google. http://www.unsupportedsoftware.com/ce/dev/cecards.htm may
also be of interest to you. It would be worthwhile to check if pegcards.dll
exports any functions by using Depends.exe on the emulator (x86) copy of
pegcards.dll. At the very least you can extract the 52 bitmaps for the
cards from there and write your own DLL.
 
Other stuff I've read states that there are no useful methods in pegcards,
just the card bitmap resources.

Apologies if the next paras are dumb but I'm new to Pocket PC development...

How can I use depends.exe (I presume you mean the tool that comes with
Visual Studio 6?) on pegcards?
When you run depends.exe, the File Open dialog will not let you browse to
the Pocket PC.
Also if you try to copy pegcards.dll from the Pocket PC to the desktop PC
you get an error message stating that ROM embedded files cannot be
copied!?#*!
So I can't even open pegcards with depends.exe!

Also how can you use depends.exe to extract resources?
(I thought it just showed dependencies?)

Thanks for any help :-)
 
Back
Top