Author Topic: What is asciiz ptr?  (Read 3258 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
What is asciiz ptr?
« on: March 13, 2011, 01:54:29 AM »
Hi all..
I hope that my question is not stupid.
What exactly is :
Dim cmdline as asciiz ptr
Is this string pointer or some sort of casting string as pointer?

kryton9

  • Guest
Re: What is asciiz ptr?
« Reply #1 on: March 14, 2011, 01:51:27 PM »
Aurel, I don't know for sure.... but my guess is it is an ascii (not supporting wide strings) string pointer that is terminated by a zero, or Null. How it works I have no idea?

efgee

  • Guest
Re: What is asciiz ptr?
« Reply #2 on: March 14, 2011, 03:34:19 PM »
Aurel, I don't know for sure.... but my guess is it is an ascii (not supporting wide strings) string pointer that is terminated by a zero, or Null. How it works I have no idea?

ASCIIZ is an ascii string (character size is one byte) that is terminated with $0.
"cmdline" would become a pointer to such a string.
(a pointer does not need to be "terminated" as the length is always depending on the OS - 32 bit on a 32 bit OS, 64 bit on a 64 bit OS)

A pointer is a location in memory that holds the starting location of something else (in this case a string).
So the pointer "cmdline" only knows where the string is but not what the string's content is...

Aurel

  • Guest
Re: What is asciiz ptr?
« Reply #3 on: March 15, 2011, 12:01:44 AM »
Thanks ..
So this is string pointer.