|
according to me, you can solve the problem by creating a DLL project which has a fuction MyFunc() returning application object's address. Include this Dll in your addin and call MyFunc().
never say die
|
|
|
|
|
Hi,
I am not sure i follow, can you show me code on how to do that?
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hey Guys,
Yesterday I recompiled an MFC application in Visual C++.NET which had previously been built using VC6. Aside from a few casting issues, the compile seemed to work OK. However, the app will not execute. When I execute the app, the error I get is 0xC0000005: Access violation. The problem is that this exception is thrown before my app even gets into WinMain. The stack trace when the exception is raised is:-
<br />
NTDLL.DLL!_RtlRaiseStatus@4() + 0x24 <br />
NTDLL.DLL!_LdrpInitialize@12() + 0x15276 <br />
NTDLL.DLL!_KiUserApcDispatcher@20() + 0x7
When I take a look in the output Window after execution I get.
First-chance exception at 0x77f92373 (NTDLL.DLL) in WMSClient.exe: 0xC0000005: Access violation writing location 0x00000010.<br />
First-chance exception at 0x7c59ba9d in WMSClient.exe: 0x000003E6: Invalid access to memory location.<br />
First-chance exception at 0x77f92373 (NTDLL.DLL) in WMSClient.exe: 0xC0000005: Access violation writing location 0x00000010.<br />
First-chance exception at 0x77fb17a4 (NTDLL.DLL) in WMSClient.exe: 0xC0000005: Access violation.<br />
Unhandled exception at 0x77fb17a4 (NTDLL.DLL) in WMSClient.exe: 0xC0000005: Access violation.<br />
The program '[1968] WMSClient.exe: Native' has exited with code 128 (0x80).
At first I thought it was maybe caused by one of the global variables causing problems but most of them are basic types. Those which are classes, I put a breakpoint in the constructor but it never gets called.
Can anyone suggest anything else to look at?
Cheers
James
|
|
|
|
|
I will tell you one thingk vs.net is a junk at its best....
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
Hi !
In my application, I had to test many strings and (as the keyword 'case' is not usable for strings) I did something like this :
if (MyString==THIS_STRING)
{
}
else if (MyString==THAT_STRING)
{
}
else if (MyString==ANOTHER_STRING)
{
...
...
...
else
{
}
The problem is that I have to compare my string with more than 128 possible strings, and I discovered this morning that the compiler (Visual C++ 6) is not able to cope with more than 128 if's !!!!
Any idea on what would be a nice workaround for this limitation ?
Thanks !
Jerome
|
|
|
|
|
You could nest your Ifs, based in the first letter, then check for the second (and third...) letter in lower levels.
This way you can circumvent the limitation.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
It is the most simplest thing to do in programming live,
here it goes, create an array of all the strings taht you want to compare with,
then in a loop compare with each string and do appropriate action.(you can build your logic around this)
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
How about switch... case... statement?
Although to be honest I like the idea of strings' array better. Unfortunately, it's not mine. .
modified on Monday, November 29, 2010 6:02 AM
|
|
|
|
|
|
|
Where to get "sys/ioctl.h"???
Thank you!!!
Rap off for you,for me,for our human.
|
|
|
|
|
It won't matter whether you get it or not, unless you deleted it by accident. That's because the header files contain only declarations of functions, not their implementation.
I think sys/ioctl.h is a *nix header, if you're on windows you have little chance to compile the program (without many modifications to the code).
|
|
|
|
|
hi ,
i have a dialog based application in which i would like to incorporate the CMemDC concept ... can i use it???]
Thanks
Satadru
|
|
|
|
|
if you habe CMemDC Class
onpaint()
{
CCLientDC dc(this);
CMemDC pDC(&dc);
//Draw Using pDC , Simple enough
}
|
|
|
|
|
hi , thanks for your kind help....
i have the following problems... would be gratefulif you could kindly give me some suggestions.....
1)i have a dialog based application in which i have to implement a scroll view .. can i use CSrollView(i suppose i cant)..if not how do i do it..if yes then how do i do it
2)i have to capture the entire image irrespective of being within the viewable region or not ....how do i go about it....
plesae help...
Thanking you.
Satadru
|
|
|
|
|
Hey,
is it possible to connecta network-drive (e.g. "\\mypc\mydata" as drive e as I can do it within my windows-explorer.
|
|
|
|
|
hello !!
how to get the absolute path(full path) for the file which is printed ???. i m getting the file name with type of document in one element of JOB_INFO_* structure. but could not get the absolute path of it .....how to get the absolute path ...??
skpanda
|
|
|
|
|
I have to develop a multithread application.
My problem is to wait the closure of all threads
when I close my application.
I have seen that WaitForSingleObject can be used
also for threads ? Is it possible that, suppling
the thread handle to this function I can solve my
problem ?
In another way I have used an event set by the thread
when it is going to exit (the application waits for
this event after having wake up the thread) but this
solution causes a application blocking (deadlock).
Can someone help me ???
Thanks a lot !!!
|
|
|
|
|
afaik you can use the WaitForSingleObject / WaitForMultipleObjects to wait on thread handle for it's closure.
|
|
|
|
|
Hello-
I would like to build an interface with dockable pieces to it. These pieces probably most closely resemble a dialog box. That is, they have several controls as components.
I would like to construct the pieces by code -- without the dialog editor. I'm quite new to all of this, so I may be attacking this the wrong way, but I am looking at the CDialogBar class which is at least a start for dockable dialogs, but doesn't allow creation without a resource ID.
Is there a better approach? How can I create a CDialogBar without a resource ID?
|
|
|
|
|
hi,
Its good that i experienced the same problem. And found the solution for myself. This really works:
Here is the header file :
class cSmithChart:public CDialog
{
public:
int m_iChartSize;int m_iLineColor;
cSmithChart();
~cSmithChart();
void drawSmithChart();
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
};
The implementation file :
cSmithChart::cSmithChart():CDialog()
{
DLGTEMPLATE *tmplate = new DLGTEMPLATE[4];
DLGTEMPLATE tmpl;
tmpl.cdit=0;
tmpl.style=DS_NOFAILCREATE |WS_CAPTION | WS_SYSMENU;
tmpl.x=0;
tmpl.y = 0;
tmpl.cx = 500;
tmpl.cy = 500;
tmpl.dwExtendedStyle=0;
tmplate[0] = tmpl;
tmplate[1].style=0;
tmplate[1].dwExtendedStyle=0;
int nresult = InitModalIndirect(tmplate,NULL);;
if( nresult == 0)
{
int error = GetLastError();
AfxMessageBox("Dialog Creation Failed");
}
};
cSmithChart::~cSmithChart()
{
};
BEGIN_MESSAGE_MAP(cSmithChart, CDialog)
ON_WM_PAINT()
END_MESSAGE_MAP()
void cSmithChart::OnPaint()
{
CDialog::OnPaint();
drawSmithChart();
}
void cSmithChart::drawSmithChart()
{
//Draw the smithchart
}
AS you could see i solved this for drawing a smithchart, which was a distributed .Lib file..
This is a production code. See if it works for you.
Good Luck.
John Silvester A
Asst. Manager -Projects,
SRA Systems Ltd., Chennai India
|
|
|
|
|
I want to enter in yahoo messenger window from my application i.e. login screen will be somehow skipped. Although I am trying to employ message hook, but don't know what to do and how to do.
|
|
|
|
|
Hi,
If you want to know more about hooking, try the article search! this[^] is just one out of many..
good luck!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
the link which U gv doesn't work. Moreover I am looking for Message Hooking
|
|
|
|
|
strange! The link works fine for me..
|
|
|
|