Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object doesn't support this property or method

Status
Not open for further replies.

asd78fg

Programmer
Oct 21, 2004
13
0
0
US
I'm developing a DLL in C++ that is accessed from an ASP page. When running the page this error is thrown:

Object doesn't support this property or method: 'ldap_obj.objectVersion'

The method objectVersion() does exist; as I browse component services I can see that method for my object. Plus, all other methods in the object work perfectly, so I assume it to be a problem with the C++ side of everything. I am at a loss as to what may be causing this error. Does anyone have any suggestions?

The C++ code:
STDMETHODIMP Cuserinfo::eek:bjectVersion(long *versionNumber)
{
*versionNumber = 2;
return S_OK;
}

The line in the ASP file that is throwing the error:
versionNumber = ldap_obj.objectVersion()
 
are you actually using the method without sending in a parameter as in the sample you submitted?
Code:
versionNumber = ldap_obj.objectVersion()

If so, you have to send a pointer to your long variable (or the addressof)

BlackDice

 
The long variable versionNumber is an [out, retval] variable in this object -- a long value is used similarly in other methods of this object without requiring a value to be passed in (as a value is passed out through it). Theoretically, versionNumber() should be the correct way of calling this function, then.

Besides, even when I try passing a value, it throws the same error.
 
No reason you would have known that -- I neglected to mention it :). That the method may be private is an excellent suggestion, but the only place I see any indication of that is in the header file that defines this object, and this method is listed among the public functions there. In addition, if it were private, I think it would not show up in Component Services under the object's interface. I might be mistaken about that, though, as I am still really new to this.
 
Some new information:

After more fiddling around, it seems that I can not add ANY new method. I copied/pasted a method known to work, renaming the new copy. Once again the method is seen in the Component Services browser, but when I try to call it from the ASP page, I get the same error as before. What's more, if I call the method that worked (the one that got copied), it works fine... only its clone fails.

So it looks as though somehow new methods I create can be seen, but can not be called. Any idea as to why this might happen?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top