Click here to Skip to main content
15,921,113 members
Home / Discussions / COM
   

COM

 
GeneralClient Worker threads Pin
gharrison25-Jul-02 0:36
gharrison25-Jul-02 0:36 
GeneralRe: Client Worker threads Pin
Ernest Laurentin27-Jul-02 12:46
Ernest Laurentin27-Jul-02 12:46 
GeneralCOM,Socket,ASP Pin
eyedia24-Jul-02 21:06
eyedia24-Jul-02 21:06 
GeneralHidden dialog from Dll Pin
Atin Kumar24-Jul-02 18:06
Atin Kumar24-Jul-02 18:06 
GeneralRe: Hidden dialog from Dll Pin
Ernest Laurentin27-Jul-02 12:48
Ernest Laurentin27-Jul-02 12:48 
GeneralRe: Hidden dialog from Dll Pin
Atin Kumar28-Jul-02 15:35
Atin Kumar28-Jul-02 15:35 
Generalmethod executing too many times Pin
mgriffith24-Jul-02 8:09
mgriffith24-Jul-02 8:09 
GeneralSafearray with byte data Pin
Anonymous24-Jul-02 4:09
Anonymous24-Jul-02 4:09 
I want to pass byte data from VB into a VC++ COM.

In a setData(VARIANT msgdata), I write the code below, but it has error in pdata[i] = *padata[i]. What's wrong ?

<br />
	if ((msgdata.vt & VT_ARRAY) == 0)<br />
		return E_INVALIDARG;<br />
	if ((msgdata.vt & VT_UI1) == 0)<br />
		return E_INVALIDARG;<br />
<br />
	SAFEARRAY *psa = msgdata.parray;<br />
	PBYTE *padata;<br />
<br />
	SafeArrayAccessData(psa, (void **) &padata);<br />
<br />
	//only one directly, no of element is the data length<br />
	int nsize = psa->rgsabound->cElements;<br />
	PBYTE pdata = new BYTE[nsize];<br />
	for (int i=0; i< nsize; i++)<br />
	{<br />
		pdata[i] = *padata[i];<br />
	}<br />
<br />
	SafeArrayUnaccessData(psa);<br />



In VB, I'm doing some testing code like:
<br />
        Dim ba(2) As Byte<br />
<br />
        ba(0) = 5<br />
        ba(1) = 7<br />
        ba(2) = 19<br />
<br />
        compSSM.setData(ba)<br />

GeneralRe: Safearray with byte data Pin
Vi224-Jul-02 4:20
Vi224-Jul-02 4:20 
GeneralRe: Safearray with byte data Pin
Anonymous24-Jul-02 5:53
Anonymous24-Jul-02 5:53 
GeneralPassing COM object as parameter to C++ function Pin
Tomaž Štih24-Jul-02 0:23
Tomaž Štih24-Jul-02 0:23 
GeneralRe: Passing COM object as parameter to C++ function Pin
Vi229-Jul-02 3:12
Vi229-Jul-02 3:12 
GeneralVARIANT and Byte Arrays Pin
Jose Fco Bonnin23-Jul-02 22:26
Jose Fco Bonnin23-Jul-02 22:26 
GeneralInside COM Pin
CaesarCZ23-Jul-02 12:09
CaesarCZ23-Jul-02 12:09 
GeneralPass a specific C++ object through COM server Pin
chrisl23-Jul-02 3:42
chrisl23-Jul-02 3:42 
QuestionHow to disable script in my Browser Control Pin
rokia22-Jul-02 16:17
rokia22-Jul-02 16:17 
GeneralHELP: Composite Control Pin
minhhoang22-Jul-02 11:59
minhhoang22-Jul-02 11:59 
GeneralmsWord automation Pin
pnpfriend22-Jul-02 10:25
pnpfriend22-Jul-02 10:25 
GeneralEvent Sinking Interfaces Pin
QAU22-Jul-02 2:03
QAU22-Jul-02 2:03 
GeneralEvent Sinking Interfaces Pin
Anonymous22-Jul-02 2:02
Anonymous22-Jul-02 2:02 
GeneralThumbctl doesnt work. Pin
rokia21-Jul-02 17:18
rokia21-Jul-02 17:18 
GeneralRe: Thumbctl doesnt work. Pin
toon21-Jul-02 19:44
toon21-Jul-02 19:44 
GeneralThreaded COM object Pin
Jörgen Sigvardsson21-Jul-02 8:14
Jörgen Sigvardsson21-Jul-02 8:14 
GeneralRe: Threaded COM object Pin
Len Holgate21-Jul-02 12:10
Len Holgate21-Jul-02 12:10 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 12:19
Jörgen Sigvardsson21-Jul-02 12:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.