|
Disregard the question. I discovered my folly.
I thought I had already checked nIndex in a trace but it turns out it was right where one would expect to find the problem. nIndex was the issue.
Sorry about the post.
|
|
|
|
|
Hi guys, somebody can tell me how con i show a list of network interface in my mfc application? jus tell me how con i find devices...
|
|
|
|
|
try to use winpcap, it is easy.
|
|
|
|
|
See if this article is of any help.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I'm creating an MFC application.
I was provided by the manufacturer the following code in a .h file:
#ifdef DEFINE_GUID
// The GUID that is used to identify this device's interface
// {AF1B231E-1180-420b-8CB6-2ED2A53F9F92}
DEFINE_GUID(GUID_DEVINTERFACE_ALTGENERIC, 0xaf1b231e, 0x1180, 0x420b, 0x8c, 0xb6, 0x2e, 0xd2, 0xa5, 0x3f, 0x9f, 0x92);
#endif
I #include this .h file into my .cpp file.
This is the way I use it:
HDEVINFO hDeviceInfo;
hDeviceInfo = SetupDiGetClassDevs(
(LPGUID)&GUID_DEVINTERFACE_ALTGENERIC, NULL, NULL,
DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
I get the following errors:
alt.obj: error LNK2001: unresolved external symbol
_GUID_DEVINTERFACE_ALTGENERIC
c:\...exe: fatal error LNK1120: 1 unresolved externals.
Could someone tell me if I forgot to include a library or something....
Thanks.
Kitty5
|
|
|
|
|
|
Hi All,
We currently have a client-server application written in Win32 and we're in the process of trying to create a slimmed down version of the client software for the Pocket PC. Our application is a fair size, and uses a few in-house developed DLLs for drawing areas etc. We want to be able to use code contained in these .DLLs on our Pocket PC app to avoid multiple copies of the same code in two projects. We're using VS2003.NET for the Win32 development, and eVC 4.0 for the PPC stuff.
Has anyone been in these shoes before? How have they solved the problem?
I thought of creating a similar .DLL in my PPC application, and actually link in the sources files from the original.DLL while adding #ifdefs to the .DLL to include functions that I require, then compile them using the evC compiler, realizing that not all the calls we make the .DLLs will be available in the PPC environment. This could be quite messy, but would eliminate the maintenence issue.
I realize that some of the calls that the Windows .DLL will make, will not be available in the PPC Edition. We will need to address these individually I think.
Any suggestions? Thank you very much.
Mike
|
|
|
|
|
I was told a while back that to get a release build of a project, I click Build on the Build menu, and the project executable is found in the project's debug folder. Recently, I have been told that this build is not a release build, but a debug build. I am trying to get a release version of my program, so any help clarifying how to get a release build of a project would be nice.
Thanks
ps, I am using VS C++ 2005 Express
|
|
|
|
|
If you're using VS 2005:
you should be able to go to Project then properties then under configuration there's a place where you can select release or debug.
If you're using VS 6.0:
you should be able to go to Project then settings then you can select "Settings for:" either Debug or Release
Kitty5
|
|
|
|
|
I am using VS C++ 2005 Express (VS 2005), and I have found that properties window, but I am not sure which setting I need to change to get my project to build in release mode.
|
|
|
|
|
In VS 2003 and VS 2005, the active configuration under build can be selected in a dialog box activated from menu: Build --> Configuration Manager. Then change the value of Active Solution Configuration drop-down list to "Release".
In VS 6, use Build --> Set Active Configuration menu command.
After this rebuild your project.
|
|
|
|
|
Ok, I have changed the setting, Where is my executable built? Is it still in the project's debug folder? Thanks.
-- modified at 11:07 Wednesday 21st June, 2006
I am also getting errors from this process because the compiler says: "cannot open precompiled header: \release\test.pch"
I'm not sure what is going wrong. Any ideas? Thanks
|
|
|
|
|
In the projects Release folder.
|
|
|
|
|
The output file should be in the Release folder. In order to see or change this folder, open the project's properties dialog box and see the General --> Output Directory field.
|
|
|
|
|
Thanks. I am using the stdafx precompiled header, can I just transfer the .pch file from the debug to the release folder, or will that just end up creating a debug build instead of a release build?
Thanks
|
|
|
|
|
You will need to rebuild the whole application as "release", the precompile header will be redone in the release folder.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
No, the PCH files are different in Debug and Release build. You should rebuild your application, and the PCH file will be created by the compiler.
|
|
|
|
|
The compiler will not precompile the header automatically, and creates a fatal error, when I try to compile, because it is trying to read the precompiled header, and it is not able to find the file. Is there a setting that would be able to be reset to get the compiler to create the header?
|
|
|
|
|
In a normal project created by the Wizard, you should have the "stdafx.cpp" file. Right click on it in Solution Explorer and go to Properties dialog.
In the C/C++ --> Precompiled Headers --> Create/Use Precompiled Header, you should have "Create Precompiled Header" option.
For the rest of the files, actually for the entire project, in this field you should have "Use Precompiled Header".
If you still have troubles, maybe creating of a new project will help?
|
|
|
|
|
Thanks very much, that worked.
I don't think you can create a new managed c++ project (not windows forms) in express. I had to get a managed project, and then strip all the code out of it, so creating a new project probably wouldn't be a good idea
|
|
|
|
|
Hi,
I am changing my dialog based MFC application to SDI application.
I have the initialization code in TestDlg::OnInitDialog(), in the part
//TODO: Add extra initialization here
What is the equivalent function in SDI? Where can I add this extra initialization? I see CAppView::OnInitalUpdate() function, but there isn't
//TODO: Add extra initialization here comment.
Thanks,
Harsha
|
|
|
|
|
One such place is the document's OnOpenDocument() method, or the view's OnInitialUpdate() method. It really just depends on what it is that you are initializing.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
Thank you. I am adding the initialization code related to the controls I have
added on IDD_APP_FORM (Dialog).
So I guess I should add initialization code to view's OnInitialUpdate() method.
In which case document's OnOpenDocument() method is used?
Thanks,
Harsha
|
|
|
|
|
harsha1305 wrote: In which case document's OnOpenDocument() method is used?
When you want to reinitialize the existing CDocument object, rather than create a new one.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think you can do this in CChildView::OnCreate handler for WM_CREATE notification.
|
|
|
|