6
0
mirror of https://github.com/avast/ioc synced 2024-06-25 00:08:40 +00:00
ioc-collection/VB-Research/getVarData
2021-05-19 13:26:37 +02:00
..
sample Add files via upload 2021-05-19 13:26:37 +02:00
main.cpp Add files via upload 2021-05-19 13:26:37 +02:00
pcode.h Add files via upload 2021-05-19 13:26:37 +02:00
psc.sln Add files via upload 2021-05-19 13:26:37 +02:00
psc.vcproj Add files via upload 2021-05-19 13:26:37 +02:00
README.md Add files via upload 2021-05-19 13:26:37 +02:00
vb.h Add files via upload 2021-05-19 13:26:37 +02:00

We have two interlinked functions in this example.

The C host sets a global variable used as a for loop maxCount and implements two callbacks:

  • mMsgbox prints a string message to the console
  • getData returns a variant back to the vb pcode

Type based on numeric arg passed in.

output:
------------------------------------
getData(0)
string callback: 0 TypeName(v) = String
string callback: Value = this is my string
getData(1)
string callback: 1 TypeName(v) = Byte()
string callback: Ubound: 19
string callback: Value = AAAAAAAAAAAAAAAAAAAA
getData(2)
string callback: 2 TypeName(v) = Date
string callback: Value = 3/18/2014 9:24:57 PM
getData(3)
string callback: 3 TypeName(v) = Long
string callback: Value = 32

Press any key to exit...