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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

typecasting without copy constructor

Status
Not open for further replies.

mgriffith

MIS
Jul 3, 2001
177
US
i have a hopefully quick and easy question about syntax, i have a com control which is only useful if i can declare a variable of a what i think is a type in the com control

i need to typecast a variable to something in the com control before i can use any of the static properties in there, but it doesn't have a copy constructor or default constructor...it's got nothing

if i want to use it on the server, in full blown vb, c#, c++, etc, the syntax is something like

----in vb------------------
dim x as MacolaSearch.macsearch
x.property1 = 5
x.method()

----in c# or c++-----------
MacolaSearch.macsearch x;
x.property1 = 5;
x.method();


any ideas? the only thing i could think of was doing something like
----javascript--------------------
var x;
x = MacolaSearch.macsearch(x);


but this doesn't work, and i can't use the AS keyword in vbscript...so i don't know what to do

any suggestions? mike griffith
----------------------------
mgriffith@lauren.com
mdg12@po.cwru.edu
 
If MacolaSearch.macsearch is an object, then you can use:

var x = new MacolaSearch.macsearch();
 
the default constructor is marked something other than public...i can't call initialize it as an object, even though it is one mike griffith
----------------------------
mgriffith@lauren.com
mdg12@po.cwru.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top