[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-dcom
Subject:    Re: returningvalue from Component
From:       Henk <dcom_list () ZONNET ! NL>
Date:       2001-02-28 15:29:14
[Download RAW message or body]


Yups, thats exactly what I did, and your right, it is a VT_Dipspatch with
pDispVal set to 0.


----- Original Message -----
From: "Zlatko Michailov" <michailov@AUSTIN.APC.SLB.COM>
To: <DCOM@DISCUSS.MICROSOFT.COM>
Sent: Wednesday, February 28, 2001 4:27 PM
Subject: Re: returningvalue from Component


What you need is to return "Nothing". I believe "Nothing" is VARIANT with
vt=VT_DISPATCH and pdispVal=0. You can verify this by passing a Nothing
value to a C++ program and see what the VARIANT contains.

Zlatko


----- Original Message -----
From: Henk
To: DCOM@DISCUSS.MICROSOFT.COM
Sent: Wednesday, February 28, 2001 2:12 AM
Subject: returningvalue from Component


Hello guys,

If have a small problem in ASP. I have a component (written in ATL) that
gives back a variant, by key (I use a map internally, variant are stored by
a key). This variant can be an object or a string, int etc. So my source can
do something like:

dim i
i = MyCache.Lookup("MyInteger")

if i doesnot exist the Variant is empty. No problem, but now I have an
object stored in it, so I do

dim recset

set recset = MyCache.Lookup("MyRecset")

if MyRecset does not exists I get an empty variant back as well, but this
causes a failure, cause 'set rs = ' expects an object, and an empty variant
is not an object. What can I give back in my variant if something does not
exists, something that both objects and non-object swallow. Anybody idea
perhaps?

tia
Henk

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request@DISCUSS.MICROSOFT.COM

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request@DISCUSS.MICROSOFT.COM

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request@DISCUSS.MICROSOFT.COM

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic