If my data was somthing like this:
[c]
.data
ArraySize = 8
Array1 byte ArraySize 1, 2, 4, 8, 16, 32, 64, 128, 255
Array2 word ArraySize 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535
Array3 dword ArraySize 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216
[/c]
and I had a procedure that took a pointer as a stack parameter like this:
[c]
procName proto,
pArraytr dword, aNumElems:dword, aType:dword
[/c]
then when I call the procedure like this:
[c]
Invoke procName, addr Array1, lengthof Array1, type Array1
[/c]
I'm gonna get problems bcoz Array1 is a byte array. I guess wot im asking is is there a way to generalize the pointer type when passed as a stack parameter? So that I can pass any type and the proc will accept it?
Any help or suggestions is appreciated.
Kunal.
[c]
.data
ArraySize = 8
Array1 byte ArraySize 1, 2, 4, 8, 16, 32, 64, 128, 255
Array2 word ArraySize 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535
Array3 dword ArraySize 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216
[/c]
and I had a procedure that took a pointer as a stack parameter like this:
[c]
procName proto,
pArraytr dword, aNumElems:dword, aType:dword
[/c]
then when I call the procedure like this:
[c]
Invoke procName, addr Array1, lengthof Array1, type Array1
[/c]
I'm gonna get problems bcoz Array1 is a byte array. I guess wot im asking is is there a way to generalize the pointer type when passed as a stack parameter? So that I can pass any type and the proc will accept it?
Any help or suggestions is appreciated.
Kunal.