Click here to Skip to main content
15,896,726 members
Home / Discussions / COM
   

COM

 
GeneralRe: COM compiler errors Pin
melwyn30-May-06 5:37
melwyn30-May-06 5:37 
GeneralRe: COM compiler errors Pin
Steve S30-May-06 6:02
Steve S30-May-06 6:02 
Questionvoid* and void** Pin
HakunaMatada28-May-06 21:01
HakunaMatada28-May-06 21:01 
AnswerRe: void* and void** Pin
Roger Stoltz28-May-06 21:33
Roger Stoltz28-May-06 21:33 
GeneralRe: void* and void** [modified] Pin
HakunaMatada28-May-06 22:24
HakunaMatada28-May-06 22:24 
GeneralRe: void* and void** [modified] Pin
Roger Stoltz28-May-06 22:42
Roger Stoltz28-May-06 22:42 
GeneralRe: void* and void** [modified] Pin
HakunaMatada29-May-06 0:12
HakunaMatada29-May-06 0:12 
AnswerRe: void* and void** [modified] Pin
Roger Stoltz29-May-06 0:48
Roger Stoltz29-May-06 0:48 
TechyMaila wrote:
what can I useto pass the address of HTREEITEM


If I've understood your problem correctly, you actually don't need to pass the address. You only need a way to keep track of the node that you got from the previous call to InsertChild(), right?

What I suggested in my previous post was to use an integer to be able to refer to the node you got from InsertChild().
An ugly solution, which I don't recommend, is to pass the address as a long and type cast it to a HTREEITEM pointer. This will work on systems that are 32-bit, but will surely fail if built for 64-bit systems, in other words not a very good solution. Dead | X|
Always design with distribution in mind. It will make your design better and protect you from unwanted surprises when your software is used where you didn't think it would be used.

A better solution is to still pass a 32-bit integer through the interface, but the integer is mapped to a HTREEITEM pointer that you keep in an internal map inside the server.
No need for overkill here, simply mask the HTREEITEM address with 0xffffffff to get the 32-bit identifier.

--
Roger


It's supposed to be hard, otherwise anybody could do it!

Regarding CodeProject: "resistance is pointless; you will be assimilated"

GeneralRe: void* and void** [modified] Pin
HakunaMatada29-May-06 1:08
HakunaMatada29-May-06 1:08 
QuestionHow to register shell extension DLL? Pin
Rostfrei28-May-06 20:55
Rostfrei28-May-06 20:55 
AnswerRe: How to register shell extension DLL? Pin
_AnsHUMAN_ 28-May-06 23:07
_AnsHUMAN_ 28-May-06 23:07 
AnswerRe: How to register shell extension DLL? Pin
Michael Dunn29-May-06 7:23
sitebuilderMichael Dunn29-May-06 7:23 
QuestionInprocServer32 Key Pin
Richard Andrew x6428-May-06 13:57
professionalRichard Andrew x6428-May-06 13:57 
AnswerRe: InprocServer32 Key Pin
Michael Dunn28-May-06 18:57
sitebuilderMichael Dunn28-May-06 18:57 
Questionexport data to Database Pin
viji]28-May-06 2:15
viji]28-May-06 2:15 
QuestionWIA (Windows Image Acquisition) API Pin
opl25-May-06 10:27
opl25-May-06 10:27 
AnswerRe: WIA (Windows Image Acquisition) API Pin
Renjith Ramachandran26-May-06 4:50
Renjith Ramachandran26-May-06 4:50 
Question_bstr_t and MS Security update Pin
ChrisLang25-May-06 5:43
ChrisLang25-May-06 5:43 
AnswerRe: _bstr_t and MS Security update Pin
Michael Dunn25-May-06 8:45
sitebuilderMichael Dunn25-May-06 8:45 
GeneralRe: _bstr_t and MS Security update Pin
ChrisLang25-May-06 10:30
ChrisLang25-May-06 10:30 
AnswerRe: _bstr_t and MS Security update Pin
ChrisLang25-May-06 11:17
ChrisLang25-May-06 11:17 
GeneralRe: _bstr_t and MS Security update Pin
Steve S25-May-06 22:16
Steve S25-May-06 22:16 
Questionproblem in sub report Pin
raghu sahay25-May-06 4:10
raghu sahay25-May-06 4:10 
QuestionDesktop context menu registry entries Pin
Anil_vvs23-May-06 1:33
Anil_vvs23-May-06 1:33 
QuestionPassing structure as parameter Pin
MaheshSharma22-May-06 0:42
MaheshSharma22-May-06 0:42 

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.