News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Str_GetPtr, Str_SetPtr, dynamic pointer arrays

Started by jj2007, April 27, 2010, 02:37:17 AM

Previous topic - Next topic

jj2007

Just stumbled over something new (to me :bg): Dynamic Pointer Arrays. More at this interesting site.
The odd thing is that functions like Str_GetPtr, Str_SetPtr need to be called via GetProcAddress and their ordinal numbers. And the MSDN docu says always "This function is available through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows."

On DPA_LoadStream: Microsoft documented this function for the MSDN on-line in April 2005, apparently after a contributor to a blog by Dave Massy (at Microsoft) cited this function as a counter-example to Massy's claim that Internet Explorer uses no Windows API functions that were not by then documented by Microsoft.

::)

dedndave

i am trying to think of an application where i might use that, Jochen
nothing comes to mind - although, my mind isn't what it used to be   :'(

lingo

"nothing comes to mind - although, my mind isn't what it used to be"

You can use ordered lists of arbitrary items to keep different data types in easy&faster for search and manipulation way
Example:
A. Try to find and dynamically manage all files in your disk C: which contain the string "Rich"
and are NOT  .exe files with their directories and offsets of the string "Rich" in every file.
Dynamically manage mean trace, rename, delete, add, merge or search in the files
and online change their ordered lists accordingly....
B. Try to make syntax highlighting of the assembly language in your editor
C. Make your disassembler
D. Make your grammer and spelling check 
E.....
For speed I prefer to use ordered red-black trees of arbitrary items rather than lists...
For red-black trees in assembly you can see Biterider's nice job here.

donkey

Quote from: dedndave on April 27, 2010, 03:36:53 AM
i am trying to think of an application where i might use that, Jochen
nothing comes to mind - although, my mind isn't what it used to be   :'(

I use them quite  a bit during development then tend to replace them once I do a release version, though I have to admit that I have left them in because they are so darn convenient and relatively fast. I used them in GoP, my most recent project to store pointers to arrays of breakpoint information as well as a few other applications. You can use them as far back as Windows 95 though they are ordinal exports when you get too far back. If you're using GoAsm with my headers you can simply define the CCUSEORDINALS switch and they will function for all versions of Windows. Some functions are conspicuously missing from older common controls but are easily faked (for example DPA_GetPtrCount). As for them being missing from future versions, I doubt that since they are used in many MS applications, they could easily remove the named exports because they only call them by ordinal but they would break a lot of their own software if they removed them completely. I have tried Dynamic Structure Arrays (DSA) in the past but now only use DPA's though for the life of me I can't say why I had to make the change, I have never used the Str_ group.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable