error 998:記憶體配置存取無效。
The third parameter: LPVOID [in] Pointer to the buffer that contains data to be written into the address space of the specified process.
you should pass a valid address to this parameter, I don't know why you use a string variable.When you wanna pass a pointer of string ( type of lpcstr),you should use "byval" keyword.When we need a parameter act as a pointer to a buffer,we often use the following way:
dim bArray(n) as byte
functionName para1,..., bArray(0),.... The last parameter : LPDWORD [out] number of bytes written if you wanna pass a null value,you should use "byval 0",else,you can define a variable whose type is "Long",and use the varible as para,it cannot be a const pointer.
The third parameter: LPVOID [in] Pointer to the buffer that contains data to be written into the address space of the specified process.
you should pass a valid address to this parameter, I don't know why you use a string variable.When you wanna pass a pointer of string ( type of lpcstr),you should use "byval" keyword.When we need a parameter act as a pointer to a buffer,we often use the following way:
dim bArray(n) as byte
functionName para1,..., bArray(0),.... The last parameter : LPDWORD [out] number of bytes written if you wanna pass a null value,you should use "byval 0",else,you can define a variable whose type is "Long",and use the varible as para,it cannot be a const pointer.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货