Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Refactoring not available with ADO
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

steve_dercks
Junior Member

USA
17 Posts

Posted - Jan 17 2012 :  4:13:10 PM  Show Profile  Reply with Quote
In the following obviously contrived code refactoring is not working.
actually all references through the pointer
pRecordset->GetCollect(...)
pRecordset->MoveNext()
pRecordset->Close()
are not found.




#include "stdafx.h"
#include "msado15.tlh"


int main(int argc, char* argv[])
{

AdoNS::_RecordsetPtr pRecordset;

pRecordset.CreateInstance(__uuidof(AdoNS::Recordset));

BOOL eof = pRecordset->adoEOF;

return 0;
}

Using VC 6.0, VA 10.6.1862.0

feline
Whole Tomato Software

United Kingdom
17026 Posts

Posted - Jan 18 2012 :  10:53:06 AM  Show Profile  Reply with Quote
Assume I know nothing about ADO, which is the case

A quick google got me to: http://www.codeguru.com/cpp/data/mfc_database/ado/article.php/c6729

which produced the piece of code:

#import "c:\\Program Files\\Common Files\\System\\ADO\\msado15.dll"
        rename("EOF", "EndOfFile")

which I added to my VC6 solution and compiled, on a winXP test machine. This produced me the file "msado15.tlh", but there is no reference to the symbol "AdoNS" inside my generated "msado15.tlh".

The symbol "_RecordsetPtr" is recognised by VA, and referenced inside "msado15.tlh" but I cannot find any sign of it being declared.

Am I missing something obvious here?

zen is the art of being at one with the two'ness
Go to Top of Page

steve_dercks
Junior Member

USA
17 Posts

Posted - Jan 18 2012 :  11:01:53 AM  Show Profile  Reply with Quote
This is a namespace defined in msado15.tlh. It's right at the top in my file.

namespace AdoNS {

//
// Forward references and typedefs
//

typedef enum PositionEnum PositionEnum_Param;
typedef enum SearchDirectionEnum SearchDirection;
struct __declspec(uuid("00000512-0000-0010-8000-00aa006d2ea4"))
/* dual interface */ _Collection;
struct __declspec(uuid("00000513-0000-0010-8000-00aa006d2ea4"))
/* dual interface */ _DynaCollection;
struct __declspec(uuid("00000534-0000-0010-8000-00aa006d2ea4"))
/* dual interface */ _ADO;
...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17026 Posts

Posted - Jan 18 2012 :  4:54:58 PM  Show Profile  Reply with Quote
Interesting, my msado15.tlh starts:

namespace ADODB {

Not sure if this matters to much or not though. Still, I am wondering why my file is slightly different.

If you do a search inside msado15.tlh for "adoEOF" are any references found? On my test system this symbol is not found in this file, which will help explain why it is underlined as a mistyped symbol for me.

zen is the art of being at one with the two'ness
Go to Top of Page

steve_dercks
Junior Member

USA
17 Posts

Posted - Jan 19 2012 :  07:43:10 AM  Show Profile  Reply with Quote
Yes it is there

__declspec(property(get=GetadoEOF))
VARIANT_BOOL adoEOF;

How can I send you my .tlh file?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17026 Posts

Posted - Jan 19 2012 :  10:56:55 AM  Show Profile  Reply with Quote
Please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up. Hopefully once I am using your .tlh file I will be able to make a bit more sense of this.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17026 Posts

Posted - Jan 23 2012 :  6:45:43 PM  Show Profile  Reply with Quote
I have your file, thank you for this, this helped. I have now found the struct declarations I wanted, and I can clearly see the problem. I have put a bug report in for this:

case=64203

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Aug 09 2012 :  02:02:17 AM  Show Profile  Reply with Quote
case=64203 is fixed in build 1912

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000