Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 ATL import intellisense problem

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
cyberhouse Posted - Apr 25 2007 : 03:13:09 AM
when i use visual assist X to import an ATL tlb file, the intellisense cannot show the wrapper class created by visual studio.
for example:

#import "testatl2005a.tlb" rename_namespace("TDM") named_guids

void test()
{
TDM::ITest1ObjPtr pTmp; //TDM:: --cannot display ITest1ObjPtr
pTmp.CreateInstance(TDM::CLSID_Test1Obj); //TDM:: --not show anything
pTmp->showHello(); //pTmp-> --cannot display showHello

}

this problem has existed for a long time. even in the latest version.

but the visual assist 4.1 for VC 6 show it correctly. why?

7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 27 2007 : 09:34:23 AM
I am seeing the same effect here. Thank you for the clear description.

case=6261
cyberhouse Posted - Apr 26 2007 : 9:48:18 PM
i tested your project, using VA X 1549, it works well.
but if i change the code
#import "..\\debug\\hello.dll" no_namespace
to
#import "..\\debug\\hello.dll" rename_namespace("TDM") named_guids

then type TDM::
it couldn't work.


feline Posted - Apr 26 2007 : 10:18:34 AM
Can you download the following test project please?

http://forum.wholetomato.com/colin/forumimages/thread_6157_com_hello.zip

This is a VS2005 format project, the one I used to test thread 6004. This way we will both be looking at the same thing. If you can easily reproduce the problem then I can follow the same steps as you, and see what happens on my test machine.
cyberhouse Posted - Apr 26 2007 : 08:24:32 AM
similar with that topic, but i found visual assist x neither supports VC 6.0, nor supports vs.net 2005.
The #import directive is used to incorporate information from a type library, it generates two files(*.tli, *.tlh) during compile the source files. i guess the visual assist x may not be parse these files. the old version VA 4.1 maybe parse these files.
feline Posted - Apr 25 2007 : 4:28:40 PM
Fairly clear instructions, but this is not going quickly, I am working out what I am trying to do as I go along. So many things to know

Does this seem to be a similar problem to this thread?

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6004

If so then I should have that test project on hand, but I was unable to reproduce the reported bug there.
cyberhouse Posted - Apr 25 2007 : 09:55:39 AM
suppose we create two projects, the first is an ATL project, the second is a MFC dialog application. we use visual C++ 6.0 to do it.

$1.create an ATL project
1.using visual C++ wizard, select ATL COM AppWizard, fill the project name with MyAtlTest
2.using default application type(dll)
3.add an ATL Object, select simple object, fill the coclass name with TestObj, the interface with ITestObj
4.build the project, then add a method 'showHello' to ITestObj interface
5.build the project.

we will find the MyAtlTest.tlb in the project directory. this is a type library file.

$2.create a MFC dialog application
1.using visual c++ wizard, select MFC AppWizard, fill the project name with testMFC, select dialog based application type.
2.copy MyAtlTest.tlb from MyAtltest to testMFC project's directory
3.add a line
AfxOleInit();
in the CTestMFCApp::InitInstance() function.
4.add a button in the dialog resource, double click the button

5.open testMfCdlg.cpp, add a line below #include "testMFCDlg.h" :
#import "MyAtlTest.tlb" rename_namespace("TDM") named_guids

we can also use MyAtlTest.dll instead of MyAtlTest.tlb
6.in OnButton1() function, we can write the codes:
TDM::ITestObjPtr pTmp;

pTmp.CreateInstance(TDM::CLSID_TestObj);
pTmp->showHello();

if we use visual assist 4.1, the intellisense works well, but visual assist X show nothing.
feline Posted - Apr 25 2007 : 06:53:15 AM
Do you have a simple test project that shows this effect that you could send me? I am not sure how to create the ATL TLB file and setup this test.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000