|
The main problem is in defining what is an object? Once you can answer that than only you can extract it from the image.
Saurabh
|
|
|
|
|
Sir,
What i have to do is a theft detection project.For that I have to identify and mark objects present in the scene.I have to also define a region of interest.I use VC++ and OpenCV.Please do help me by providing the essentials.
Thanks in advance.
|
|
|
|
|
Can anybody tell me what is an interface class and how can we implement it.what is the difference between using an abstract class and an interface
|
|
|
|
|
Deepu Antony wrote: Can anybody help me
Read Here[^] to gain an insight on abstract class and interface.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Hi,
We have created three text files through our application. We have to open that three text files in separate worksheets in a excel file. Please suggest your ideas.
With Regards,
Sangeetha.
|
|
|
|
|
Hi,
We could able to open a workbook using OpenText() method. We are facing problems in importing multiple text files in separate sheets. Please give me some ideas.
With Regards,
Sangeetha.
|
|
|
|
|
See here[^] does any help?
|
|
|
|
|
My MFC application consists of one main dialog, and it has an MCIWnd control created at the bottom for simple media playing functionality.
I currently use MCIWndCreate in the main window's OnInitDialog function, creating it as a child window. Most of the media it plays is streamed from the internet. This creates a problem when the user seeks in the MCIWnd, and it has to access the internet for more data. The MCIWnd freezes the whole app until it is able to resume playing (once it finished downloading more data). Usually it only takes a few seconds; however, it tends to be bothersome still.
I was wondering if there was a way to create the MCIWnd as a child of the main window, but have all of its functionality run in a seperate thread, so that the main thread can continue uninterupted while MCIWnd downloads its data.
Thanks for reading the lengthy post and providing any help.
|
|
|
|
|
Did you try with WS_POPUP instead WH_CHILD on the MCI_OPEN command?
|
|
|
|
|
HOOKPROC hkprcMsgProc=NULL; //the pointer of MsgProc()
static HINSTANCE hinstDLL=NULL; //the handle of dll!
static HHOOK hhookMsg=NULL; //the handle of hook!
DWORD tID=3464; //a thread id
hinstDLL = LoadLibrary((LPCTSTR) "QQDetours.dll");
hkprcMsgProc = (HOOKPROC)GetProcAddress(hinstDLL, "MsgProc");
hhookMsg = SetWindowsHookEx(WH_GETMESSAGE,hkprcMsgProc,hinstDLL,tID);
The tID is a thread id,but SetWindowsHookEx is not succeed.
Why?
|
|
|
|
|
yonghengzhimi wrote: hhookMsg = SetWindowsHookEx(WH_GETMESSAGE,hkprcMsgProc,hinstDLL,tID);
If your trying to install a global hook, you should pass the thread id as 0.
If you are trying to set a Local thread hook, then you need to set the HINSTANCE as 0.
|
|
|
|
|
|
|
Hi there,
I am trying to start a service already installed from a C++ code ( the c++ could be normal application, a win32 application, or even a dll application)
is that possible ( to start a specific service via it's name )
if so, how can I do it ?
Thanks in advance
There is always something to learn
|
|
|
|
|
SC_HANDLE hScm = OpenSCManager(NULL, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS);
SC_HANDLE hService = OpenService(hScm, sServiceName, SERVICE_ALL_ACCESS);
StartService(hService, 0, NULL))
|
|
|
|
|
thanks a lot
should I include a special library ?
There is always something to learn
|
|
|
|
|
|
yes, StartService
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I was busy creating a Dll for some basic game engine (just for myself)
For the input, I would like to have some general function pointers inside my dll which I want to be able to reference to other functions from code based upon my exe file.
just like this:
<br />
on_a = function_to_do_on_A;<br />
on_esc = function_to_do_on_Esc;<br />
where on_a comes from the dll and the function_to_do_on_A comes from the application.
this is my code:
<br />
Dll:<br />
.h<br />
#define ENGINE_EXPORTS<br />
#ifdef ENGINE_EXPORTS<br />
#define ENGINE_API __declspec(dllexport)<br />
#else<br />
#define ENGINE_API __declspec(dllimport)<br />
#endif<br />
<br />
.cpp<br />
namespace Engine<br />
{<br />
namespace Input<br />
{<br />
ENGINE_API void (*on_a)(void);<br />
ENGINE_API void (*on_b)(void);<br />
ENGINE_API void (*on_c)(void);<br />
}<br />
}<br />
<br />
<br />
Exe:<br />
.cpp<br />
void FuncA(void)<br />
{<br />
MessageBox(NULL, L"FuncA called!", L"NOTIFICATION!", MB_OK);<br />
return;<br />
}<br />
<br />
int main()<br />
{<br />
Engine::Input::on_a = &FuncA;<br />
return 0;<br />
}<br />
<br />
errors<br />
on_a is not a member of Engine::Input<br />
on_a undeclared identifier<br />
<br />
<br />
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br />
Exe:<br />
.cpp<br />
int main()<br />
{<br />
{<br />
using namespace Engine::Input;<br />
on_a = &FuncA;<br />
}<br />
return 0;<br />
}<br />
<br />
errors<br />
on_a undeclared identifier<br />
<br />
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br />
<br />
.h<br />
namespace Engine<br />
{<br />
namespace Input<br />
{<br />
extern ENGINE_API void(*on_a)(void);<br />
}<br />
}<br />
<br />
error LNK2001: unresolved external symbol "void (__cdecl* Engine::Input::on_a)(void)" (?on_a@Input@Engine@@3P6AXXZA)<br />
What am I doing wrong? Why is my function pointer not being exported? And how to fix this problem?
Many thanks in advance.
ps. I am using VS2008
modified on Sunday, April 27, 2008 4:19 PM
|
|
|
|
|
Are you linking the exe to the import library (.lib) created by the DLL build?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
yes as follows..
<br />
#include "..\Engine\Engine.h"<br />
#if defined(DEBUG) | defined(_DEBUG)<br />
#define USE_DEBUG_ENGINE<br />
#endif<br />
<br />
#ifdef USE_DEBUG_ENGINE<br />
#pragma comment(lib, "..\\Debug\\Engine.lib")<br />
#else<br />
#pragma comment(lib, "..\\Release\\Engine.lib")<br />
#endif<br />
normal functions (and classes) declared within the namespace are working properly
for instance:
<br />
int Height = Engine::GetHeight();<br />
returns the proper value
|
|
|
|
|
The first version of your EXE code works for me as long as
that last header file code is included in the EXE cpp file.
Exe:
.cpp
namespace Engine
{
namespace Input
{
__declspec(dllimport) void (*on_a)(void);
}
}
void FuncA(void)
{
MessageBox(NULL, L"FuncA called!", L"NOTIFICATION!", MB_OK);
return;
}
int main()
{
Engine::Input::on_a = &FuncA;
return 0;
}
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
The namespace Engine and it's 'member'- namespace Input are within the Dll file..
This means that the declaration is within the Dll file:
ENGINE_API void (*on_a)(void);
if I put the following code above the main function of mine:
namespace Engine
{
namespace Input
{
__declspec(dllimport) void (*on_a)(void);
}}
I get the following warning:
warning C4273: 'Engine::Input::on_a' : inconsistent dll linkage
followed up with an error:
error C3861: 'on_a': identifier not found
|
|
|
|
|
DllFile.h :
#ifdef ENGINE_EXPORTS
#define ENGINE_API __declspec(dllexport)
#else
#define ENGINE_API __declspec(dllimport)
#endif
namespace Engine
{
namespace Input
{
ENGINE_API void (*on_a)(void);
ENGINE_API void (*on_b)(void);
ENGINE_API void (*on_c)(void);
}
}
DllFile.cpp :
#define ENGINE_EXPORTS
#include "DllFile.h"
ExeFile.cpp :
#include "DllFile.h"
int main()
{
Engine::Input::on_a = &FuncA;
return 0;
}
|
|
|
|