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
 extern "C" + WIN32_FIND_DATA
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jh2002
New Member

9 Posts

Posted - Oct 18 2005 :  12:51:35 AM  Show Profile
(1)

VA.X seems unable to recognize declaration inside extern "C". Try this:

extern "C"
{
LPVOID WINAPI MDAllocMem(int cb);
LPVOID WINAPI MDReallocMem(LPVOID p, int cb);
BOOL WINAPI MDFreeMem(LPVOID p);
}

All things in the brackets is labelled as mistyped.

(2)

WIN32_FIND_DATA fd;
fd.

When I pressed '.', VA's prompt is bData, not a member of that structure.

BTW: I'm a registered user, I posted this message to support mailbox for several times. There is no answer, no reply, no receipent, no nothing. Is this a proper manner?

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 18 2005 :  4:19:24 PM  Show Profile
point 1, confirmed, and thats not helpful.

case=849

point 2, adding this code to a C++ file, using VS 2003 and VA 1426 is producing the following:



which seems correct, based on a look at the help files.

is this problem context sensitive? if you try in a different file, or solution do you still get this problem? what happens if you try goto (alt_g) on WIN32_FIND_DATA ?

as for emailing support, i would hope you would get a reply. how long did you give support? i am aware that they are very busy, for what that is worth.

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

support
Whole Tomato Software

5566 Posts

Posted - Oct 18 2005 :  7:20:04 PM  Show Profile
We hunted through email for "extern c", your member name and the email associated with your account. We couldn't find anything. We suspect your email was caught by a spam filter (and we emptied our spam logs just six hours ago.) That said, it's true we don't get to all messages.

You are welcome to send a test message to us, perhaps from a different email account.
Go to Top of Page

jh2002
New Member

9 Posts

Posted - Oct 18 2005 :  11:47:02 PM  Show Profile
For case 2, try to generate an ATL project, not attributed. And modify stdafx.h to:

#define STRICT
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define _WIN32_WINDOWS 0x0501
#define _WIN32_IE 0x0501
#define ISOLATION_AWARE_ENABLED 1
#define _ATL_APARTMENT_THREADED
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#define _ATL_ALL_WARNINGS // turns off ATL's hiding of some common and often safely ignored warning messages
#ifdef _DEBUG
#define _ATL_DEBUG_QI // Trace which interfaces are requested.
#endif
#define _CRT_SECURE_NO_DEPRECATE
#include <vector>
#include <algorithm>
#include <map>
#include <shlobj.h>
#include <shobjidl.h>
#include <comdef.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlstr.h>
#include <atlsnap.h>
#include <atlwin.h>

and save. Now turn to any source files, type

WIN32_FIND_DATA fd;
fd.

and VA prompts:

bData [shtypes.h]

The project still complies which means the source code is correct.

In MFC projects, VA recongized fd correctly (I never used MFC :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 19 2005 :  4:36:59 PM  Show Profile
i have created a non attributed ATL exe project in VS 2003 with VA 1428

i replaced the entire content of "stdafx.h" with the code given here, and then i went to my main cpp file, and into _tWinMain i entered:

WIN32_FIND_DATA fd;
fd.|

and i got the full list, as expected. i then moved to "stdafx.cpp" and entered the code:

static void testFn()
{
WIN32_FIND_DATA fd;
fd.|
}

and again i got the correct suggestion. either this has been fixed in 1428, or this test does not replicate what you are doing.

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

jh2002
New Member

9 Posts

Posted - Oct 20 2005 :  04:40:27 AM  Show Profile
Try a non-attributed ATL DLL project. I just typed:

WIN32_FIND_DATA fd;
fd.

in DllMain()
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 22 2005 :  10:09:44 AM  Show Profile
i did the following in VS 2003 with VA 1428

file menu -> new -> project -> visual C++ projects -> ATL project
name = atl_non_attrib_dll

application settings
attributed = off
server type = dll
all additional options off

opening the main cpp file i have the code:

extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
    hInstance;

    WIN32_FIND_DATA fd;
    fd.|
    return _AtlModule.DllMain(dwReason, lpReserved); 
}


as before i am getting the full and complete list. is there something odd about your setup or machine? any other plugin's installed? is it only this structure that has this problem? or is it more wide ranging?

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

jh2002
New Member

9 Posts

Posted - Oct 23 2005 :  03:38:06 AM  Show Profile
It's by far the only structure I found VA can't always recognize correctly. I just found if I disable

Get content from default intellisense

then the problem is gone. I try to dig into the ncb file of my test project and found '_WIN32_FIND_DATAA::bData' symbol. So it's not a VA.X bug but VS's.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 25 2005 :  5:06:24 PM  Show Profile
*ah* VS is notorious for managing to corrupt the ncb files even when VA is not installed.

if you find the suggestions from VA are suitable you may want to create a zero length read only ncb file, and just tell the IDE to ignore it when you load your project.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000