|
Each client will need the appropriate run-time packages for the version of Visual Studio you are using.
I have a bunch of the C++ ones in my forum for my Fibonacci project.
This way users can download them as needed.
http://www.contract-developer.tk
|
|
|
|
|
I am using Visual C (win32 Console Application) for feature extraction program. In my project I am extracting features from the trained images. Features aren in form of structures. Strcuture has 4 DOUBLE data items and 1 INT array of size 128. So this means one feature from the image. On average one image may generate from 500-1000 features.
I am using dynamic memory allocation to store the structures for every trained image. I am using 800 images for training. This means huge amount of memory will be consumed to keep these features iN RAM. Now problem is that after training of 740 images I am getting error of memory leak i.e. insufficient memory to allocate. I have tried every possible way to avoid it but can't. So please tell me how i can overcome this issue. I will be really grateful.
|
|
|
|
|
Maximum of 2GB memory can be given to a process at a time (in 32-bit OS), once it goes beyond that limit, the program will not work. Now first check if you want all these 800 immages to be in memory at a time, if no then see that you are freeing up the unnecesssary memory. If you are facing difficulty in tracing that you are freeing up the memory correctly or not then you can use any memory leak detection tool to verify that. One of popular freeware is LeakDiag.
Hope this will help you.
Thanks,
Anand.
|
|
|
|
|
I compile the program in vs2005 and succees.
But when run the exe file, it cannot run.
I use the depends to see the dll and find that it needs MFC80UD.DLL file. I can find this dll in the visual studio 2005 install path.
How can I do ? thanks
modified on Wednesday, September 15, 2010 9:07 PM
|
|
|
|
|
yu-jian wrote: I can find this dll in the visual studio 2005 install path.
Add that path to your system PATH variable, or copy the dll to the Windows\System32 directory.
It's time for a new signature.
|
|
|
|
|
I have copy this file to the system32 folder, but no useful
|
|
|
|
|
yu-jian wrote: I have copy this file to the system32 folder, but no useful
That seems very strange, I suggest you check your PATH variable to ensure that it contains a reference to Windows\System32 .
It's time for a new signature.
|
|
|
|
|
I have copyed all the mfc dll to the system32 but no use
Then I install the sp1 for the visual studio 2005 then all the OK.
thanks for your reply.
|
|
|
|
|
Am new to WTL, but why am I having so much problem adding a normal toobar to my simple dialog based app ? It seems to be easy with a Frame, but not a dialog as far as I can see. I can see quite a few people asking this question, but not any reasonable examples - but I may be missing them.
|
|
|
|
|
Dialogs only provide limited functionality, their job is really to just host a few controls. I can't say for certain but I'm guessing this may be the reason you are having problems. That is Dialogs and Toolbars just don't go go together. I do know that when starting with WTL Dialogs seem less daunting than say, CWindowImpl. I did a search of my WTL/ATL code and all toolbars I've implemented have been on CWindowImpl based windows. Maybe it's time to move on from a Dialog based app.
|
|
|
|
|
hi guys, i'm having problem passing the value of color picker to my COLORREF variable..
my code on KEYDown Event:
CGDICarSampleDlg.cpp file
/*
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
color = dlg.GetColor();
}
Invalidate();
*/
when the color picker apears, i just choose a color,.
i created a brush on my Car.cpp file,
m_brCar.CreateSolidBrush(RGB(0, 0, 255));
now my problem is this, how do pass whatever the value of chosen color to a COLORREF variable, then pass it to m_brCar.CreateSolidBrush(COLORREF variable);?
so when i chose a color, my CAR DRAWING changes it's color, initialy the color is BLUE..
thanks ahead..
|
|
|
|
|
ok, i resolved it on my own...
using these three lines of code i was able to extract the RGB...
r = GetRValue(color);
g = GetGValue(color);
b = GetBValue(color);
haha... google is a friend, don't be shy to ask GOOGLE..
|
|
|
|
|
Hi ,
I developed a new OCX in VC++ 2008 , it is working .i want to rename the OCX. how to do that. Pls give u’r suggestion .
Now my OCX file name is “IPCalling.ocx”, rename to “IPCall.ocx”
Thanks
shakumar
|
|
|
|
|
you can simply rename the ocx file, but should register it again (either manually or using RegSvr32.exe) to work properly.
|
|
|
|
|
This may or may not work depending on how the registration code is implemented: if it hard codes the name of the exe it will not.
Steve
|
|
|
|
|
I just guessed that he wasn't writing the acitveX from scratch and didn't hardcode any file names in his own DllRegisterServer
|
|
|
|
|
That's true , but to register an ActiveX, the full path of it is needed: using an hardcoded one, means that to work properly, the ActiveX must reside on a specific folder (the one that the programmer had choosen)...
It's too much better to let unmodified the registration code generated by the Application Wizard, as it uses the GetModuleFileName function.
|
|
|
|
|
yes.. thats what i exactly meant and what he might have already done!
|
|
|
|
|
Thanks for u’r reply
Finally I able to rename the OCX file .it is working fine in my test application.
But my requirement is , I am already having “IPCall.ocx” , now I created new “IPCalling.ocx” and i try to rename to “IPCall.ocx” but i cant.
so i created another new OCX application in name of “IPCall.ocx” and include the all files , methods & property as older OCX and applying older OCX GUID CDECL to new it is working in Test application.
But when I applying to main application this new OCX rise error
Error : 339:component ’ IPCall.ocx’or one of its dependencis not correctly registered: a file missing or invalid
I registerd the OCX file & it is working in Test application which is tested by the older OCX file.. But not working in main application.
How to check the "missing dependencis in new OCX".
or
list all dependencis in older OCX so ill compare to new and if it is missing i will include.
Regards & Thanks
shakumar
modified on Friday, September 3, 2010 9:40 AM
|
|
|
|
|
if you just want to only change the name of output binary, why don't you cahnge it in Project Properties->Linker->General->Output File. ?
As you could successfully register the ocx, there is rare chance to miss the dependencies. still to make sure on implicitly linked dependencies, if any, use tools like 'Dependency Walker'
|
|
|
|
|
Looking for c++ winsock example code that will enable the following: Allow for multiple clients each on a different machine ie different ip address to connect in. I would like to listen on the same port for all clients and also once connectivity is established be able to send and receive using this same port for each and all the connections.
Currently, with the code I have written connections seem to get established and I initially receive data from the client but when I attempt to send to client I do not get any errors but the client isn't receiving my message either. Then when viewed in Wireshark I see that the messages are associated with "ezmessagesrv". Something to do with unknown caller.
One question, the server socket I use to establish the bind and listen, once the accept returns successfully with the new client socket connection should I close the server socket (the one I use to do the listening) and reinitialize before attempting to listen for other client connections?
|
|
|
|
|
Have a look at Beej's guide to networking programming[^], there are client/server examples in chapter 6.
Another starting point is the Winsock Programmer's FAQ[^], it has examples in section 6.
Regarding a server, the normal way would be opening a server socket, calling bind and listen and then accepting incoming client connections. You do not close the server socket, while more incoming connections are expected. Here is a code fragment (your code could look different, but the principle stays the same):
void CSocketServer::OnAccept(int nErrorCode)
{
CAsyncNetwork::OnAccept(nErrorCode);
CAsyncNetwork* pSocket = new CAsyncNetwork;
if(Accept(*pSocket))
{
m_listSockets.push_back(pSocket);
} else {
delete pSocket;
}
}
CSocketServer server;
server.Open();
server.Bind(4242);
server.Listen();
Hope this helps.
/Moak
|
|
|
|
|
Does anyone know Interface of Microsoft DataGrid Control?(ActiveX Control)
WTL Application
Enable Activex Control
CAxWindow wndAtlAx = getdlgitem(ID_DATA_GRID_ACTIVE_X_CONTROL);
wndAtlAx.querycontrol(?)
I try IDataGrid... there is no similar COM Interface name in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include.
how can i use DataGrid in WTL?
thanks.
|
|
|
|
|
did you use 'OLE-COM Object Viewer' that comes with visual studio tools to explore the interfaces of the ActiveX control? have a try.
|
|
|
|
|
What would be the best way to have a C++ program write(append) to a file and at the same time have a Visual basic program read sequentially all that's been written and when it reaches EOF wait for more? How would file/record locking be used to accomplish this?
|
|
|
|