|
And you still have not explained what your problem is.
Use the best guess
|
|
|
|
|
I would like to know if this particular API has any known issues.
|
|
|
|
|
Then you should read the documentation and Google for other questions.
Use the best guess
|
|
|
|
|
hello;
in a matrix of size m * n which contains only '0 'and '1', I want to calculate the sequence of two elements in each row.
example:
If the first row of the matrix is: 0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0
the first row of the matrix result should be: 5 3 4 2 2
That is to say: five zero, followed by 3 one, followed by four zeros, etc. ....
and so on for each row
|
|
|
|
|
M77ATTAT wrote: I want to... Ok, so what do you have so far (even if pseudo code on paper)?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
You need two additional variables, representing the last number seen (or the initial state) and a count of the number times you've seen this number. Reset these before processing a row.
|
|
|
|
|
yes indeed. I just found the solution as follows:
int* printArray(int *input,int max)
{
int *res;res=(int*)malloc(max*sizeof(int));for(int i = 0; i<max; i++) {res[i]=0;}
int current_kind = -1;
int count = 0;int cp=0;
for(int i = 0; i<max; ++i) {
if (current_kind!=input[i])
{
if (count!=0) res[ cp]=count;
current_kind = input[i] ;
count = 1;cp++;
} else { count++; }
}
res[cp]=count;
return res;
}
after, just use this function to calculate the matrix row by row.
thanks for suggestion !
|
|
|
|
|
I am opening a COM port in a class constructor - no problem.
I can send some data at this point too - no problem.
BUT, if I try to send data from any other method in the class it appears to work ok (I get the expected ERROR_IO_PENDING), but subsequently my code suffers an unpredictable and undebuggable crash. Any ideas anyone (please ask for more info' if needed)...
Some code;
CSerialDevice::CSerialDevice(
CString& strDeviceId,
CString& strDeviceName,
CString& COMPort,
CString& BaudRate,
CString& Format,
ComWrapper_c<CConnection15> Db, GobList_t& rGobList,
CSerialIOInterface* pInterface )
: pOurInterface( pInterface ),
m_hCommPort( NULL )
{
AddDigitalItems( strDeviceName, strDeviceId, Db, rGobList );
AddAnalogueItems( strDeviceName, strDeviceId, Db, rGobList );
if ( !ConfigureSerialPort( COMPort, BaudRate, Format ) )
{
pOurInterface->AddErrorToStatus( "Failed to configure port for " + strDeviceName );
}
}
bool CSerialDevice::ConfigureSerialPort(
CString& strCOMPort,
CString& strBaudRate,
CString& strFormat )
{
m_hCommPort = CreateFile(
strCOMPort,
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
0 );
DCB dcb = {0};
dcb.DCBlength = sizeof(DCB);
if ( !GetCommState( m_hCommPort, &dcb ) )
{
return false;
}
dcb.BaudRate = atoi( strBaudRate );
dcb.ByteSize = atoi( strFormat.Left( 1 ) );
int parity = NOPARITY;
if ( strFormat.Mid( 1 ) == 'N' )
{
parity = NOPARITY;
}
else if ( strFormat.Mid( 1 ) == 'E' )
{
parity = EVENPARITY;
}
else if ( strFormat.Mid( 1 ) == 'O' )
{
parity = ODDPARITY;
}
dcb.Parity = parity;
int stopBits = atoi( strFormat.Right( 1 ) );
switch ( stopBits )
{
case 0 : stopBits = ONESTOPBIT; break;
case 2 : stopBits = TWOSTOPBITS; break;
default : stopBits = ONESTOPBIT; break;
}
dcb.StopBits = stopBits;
if ( !SetCommState( m_hCommPort, &dcb ) )
{
return false;
}
COMMTIMEOUTS timeouts;
timeouts.ReadIntervalTimeout = MAXDWORD;
timeouts.ReadTotalTimeoutMultiplier = 0;
timeouts.ReadTotalTimeoutConstant = 0;
timeouts.WriteTotalTimeoutMultiplier = 0;
timeouts.WriteTotalTimeoutConstant = 0;
if ( !SetCommTimeouts( m_hCommPort, &timeouts ) )
{
return false;
}
Sleep( 100 );
int loops = 40;
while ( loops-- )
{
OVERLAPPED ovlWrite = {0};
WriteFile( m_hCommPort, mTxBuf, 7, NULL, &ovlWrite ); Sleep( 100 );
}
return true;
}
void CSerialDevice::TransmitData( int bytesToSend )
{
OVERLAPPED ovlWrite = {0};
WriteFile( m_hCommPort, mTxBuf, bytesToSend, NULL, &ovlWrite );
}
|
|
|
|
|
CSerialDevice::TransmitData( int bytesToSend )
{
OVERLAPPED ovlWrite = {0};
WriteFile( m_hCommPort, mTxBuf, bytesToSend, NULL, &ovlWrite );
}
The OVERLAPPED structure ovlWrite is a local variable that goes out of scope when leaving the function. But when writing is finished later, the system tries to access it. To avoid this, make ovlWrite a member variable of your class or make it static.
|
|
|
|
|
Many thanks, Jochen, that was the solution! (I live and learn...).
|
|
|
|
|
I try to keep code that "does stuff" out of the constructor and limit that method to doing attribute assignments. If I am correct, if something barfs in the constructor you have no way of handling the mess gracefully and recovering. Isn't there some kind of create or init method that you can use?
David
|
|
|
|
|
Thank-you, David. That wasn't the solution (see Jochen's reply above), but yours was still good advice...
|
|
|
|
|
The guys have already given you good hints, I give you another one: Never call virtual methods from the constructor and destructor of your classes because at the time the constructor and destructor is executed the vtable is set the the vtable of the class whose ctor/dtor is being executed even if this object is the instance of a derived class that would have override for the called virtual methods. This leads to a lot of errors and this C++ glitch also implies that serious initialization in the ctor is discouraged.
|
|
|
|
|
pasztorpisti wrote: the vtable is set the the vtable of the class whose ctor/dtor is being executed even if this object is the instance of a derived class
If you're constructing the object, the compiler knows the correct type at the time of construction, so how is the vtable going to be wrong?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
EDIT: previously I stated this has something to do with the closed world asssumptions of the compiler but I'm not sure about that. This thing works this way: It has no point to call the virtual method of a derived class whose constructor hasn't yet been executed because that virtual method would have access to uninitiailized members. In java and C# such virtual call calls the derived virtual method in contrast to C++!!!! But there at least the derived class members are already zero initialized, still, that is also the source of evil bugs! I had the luck to fix one such bug in java. Then why doesn't the compiler tell me about direct/indirect virtual calls from my ctor/dtor??? Because it can't always do that and even in some cases where it could tell it doesn't do that, probably the compiler writers didn't want to waste time on that or maybe this is the intended behavior even if its useless and often the source of bugs.
The code of the constructor of each c++ class looks like the following (Derived1 inherits from Base, Derived2 inherits from Derived1:
Base::Base()
{
auto generated: vtable = Base::vtable
<your ctor code here>
}
Derived1::Derived1()
{
auto generated: call Base::Base
auto generated: vtable = Derived1::vtable
<your ctor code here>
}
Derived2::Derived2()
{
auto generated: call Derived1::Derived1
auto generated: vtable = Derived2::vtable
<your ctor code here>
}
The destructors:
Base::~Base()
{
auto generated: vtable = Base::vtable
<your dtor code here>
}
Derived1::~Derived1()
{
auto generated: vtable = Derived1::vtable
<your ctor code here>
auto generated: call Base::~Base
}
Derived2::~Derived2()
{
auto generated: vtable = Derived2::vtable
<your ctor code here>
auto generated: call Derived1::~Derived1
}
With the above info guess what will be printed by this example program:
class Base
{
public:
Base()
{
VirtualCall();
}
~Base()
{
VirtualCall();
}
virtual void VirtualCall()
{
printf("Base::VirtualCall()\n");
}
};
class Derived : public Base
{
public:
virtual void VirtualCall()
{
printf("Derived::VirtualCall()\n");
}
};
void TestFunc()
{
Derived* d = new Derived;
delete d;
}
You should never do complex initialization and deinitialization in your ctor/dtor because the virtual call may be hidden inside non-virtual function calls several call deep. Or worse, when you write the ctor/dtor code it works well but someone introduces a virtual call into a non-virtual method later and this makes your ctor/dtor buggy. For this reason all I do in the ctor is filling the member vars with default values and in the dtor I just release resources held by member vars.
Indirect virtual func call with the same result as the above buggy code:
class Base
{
public:
Base()
{
IndirectVirtualCallFromCtorDtor();
}
~Base()
{
IndirectVirtualCallFromCtorDtor();
}
void IndirectVirtualCallFromCtorDtor()
{
VirtualCall();
}
virtual void VirtualCall()
{
printf("Base::VirtualCall()\n");
}
};
class Derived : public Base
{
public:
virtual void VirtualCall()
{
printf("Derived::VirtualCall()\n");
}
};
void TestFunc()
{
Derived* d = new Derived;
delete d;
}
An even worse case that results in a "runtime error: pure virtual function call":
class Base;
static void HelperFunc(Base* b);
class Base
{
public:
Base()
{
HelperFunc(this);
}
~Base()
{
HelperFunc(this);
}
virtual void VirtualCall() = 0;
};
static void HelperFunc(Base* b)
{
b->VirtualCall();
}
class Derived : public Base
{
public:
virtual void VirtualCall()
{
printf("Derived::VirtualCall()\n");
}
};
void TestFunc()
{
Derived* d = new Derived;
delete d;
}
|
|
|
|
|
OK, now it makes sense. Thanks, I learned something valuable.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I forgot to mention something: If your class in your class hierarchy is abstract or you simply know that you never create an instance of that class then you can use the __declspec(novtable) on the class in VC++. This way the ctor won't contain the automatically generated vtable initializer. If you don't call any virtual methods from the ctor (and you shouldn't) then its enough to have vtable initialization only in the actual class ctor from which you create the instance (in the "most derived" one). In practice I used this optimization only once because usually this thing is not the bottleneck.
|
|
|
|
|
Hi,
I am having trouble getting a MFC C++ app off the ground As a Child Process
if have inserted a __debugbreak in The CWinApp::CWinApp but apparently the code dies
before it reaches this point
When I try to debug this app stand alone with the VS studio debugger it gets
past CWinApp::CWinApp and dies in the CwinApp::Initinstance
I have inserted DEBUG_ONLY_THIS_PROCESS, Flag in the CreateProcess processing the
WaitForDebugEvent messages hoping to catch the error at initialization but haven't
gotten too far
I am thinking maybe there is a way to run CreateProcess stating the VS studio
debugger with .exe as parm to see what errors occur at initilazation
Thanks
|
|
|
|
|
ForNow wrote: I am having trouble getting a MFC C++ app off the ground As a Child Process Without seeing some code and more detail it is anyone's guess what may be happening.
Use the best guess
|
|
|
|
|
Here is my Code Main Program
I pasted the Child Process but it didn't seem to take so I am going to post it again
in the next post
Thanks for your help
return_code = CreateProcess((LPCSTR) &herc_command[0], (LPCSTR) &herc_parm[0], (LPCSTR) &sa,
NULL,
TRUE,
(DWORD) DEBUG_ONLY_THIS_PROCESS,
NULL,
NULL,
&si,
&pi);
if (return_code == 0 )
errcd = GetLastError();
bContinueDebugging = 1;
dwContinueStatus = DBG_CONTINUE;
while(bContinueDebugging)
{
if (!WaitForDebugEvent(&debug_event, INFINITE))
return;
switch(debug_event.dwDebugEventCode)
{
case CREATE_PROCESS_DEBUG_EVENT:
{
file_name = GetFileNameFromHandle(debug_event.u.CreateProcessInfo.hFile);
}
break;
case CREATE_THREAD_DEBUG_EVENT:
break;
case EXIT_THREAD_DEBUG_EVENT:
break;
case EXIT_PROCESS_DEBUG_EVENT:
bContinueDebugging=0;
break;
case LOAD_DLL_DEBUG_EVENT:
{
file_name = GetFileNameFromHandle(debug_event.u.LoadDll.hFile);
}
break;
case UNLOAD_DLL_DEBUG_EVENT:
break;
case OUTPUT_DEBUG_STRING_EVENT:
{
(void *) msg = malloc (debug_event.u.DebugString.nDebugStringLength);
ReadProcessMemory(pi.hProcess, debug_event.u.DebugString.lpDebugStringData, msg, debug_event.u.DebugString.nDebugStringLength, NULL);
}
break;
case EXCEPTION_DEBUG_EVENT:
{
EXCEPTION_DEBUG_INFO exception = debug_event.u.Exception;
switch( exception.ExceptionRecord.ExceptionCode)
{
case STATUS_DLL_NOT_FOUND:
i = 1;
break;
case STATUS_ACCESS_VIOLATION:
i = 2;
case STATUS_BREAKPOINT:
i = 3;
case STATUS_STACK_BUFFER_OVERRUN:
i = 4;
case STATUS_PRIVILEGED_INSTRUCTION:
i = 5;
case STATUS_INVALID_HANDLE:
i = 6;
case EXCEPTION_FLT_INEXACT_RESULT:
i = 7;
case EXCEPTION_FLT_INVALID_OPERATION:
i = 8;
case EXCEPTION_FLT_OVERFLOW:
i = 9;
case EXCEPTION_FLT_STACK_CHECK:
i = 10;
case EXCEPTION_FLT_UNDERFLOW:
i = 11;
case EXCEPTION_ILLEGAL_INSTRUCTION:
i = 12;
case EXCEPTION_IN_PAGE_ERROR:
i = 13;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
i = 15;
case EXCEPTION_INT_OVERFLOW:
i = 16;
case EXCEPTION_INVALID_DISPOSITION:
i = 17;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
i = 18;
case EXCEPTION_SINGLE_STEP:
i = 20;
case EXCEPTION_STACK_OVERFLOW:
i = 21;
default:
if(exception.dwFirstChance == 1)
{
}
dwContinueStatus = DBG_EXCEPTION_NOT_HANDLED;
}
break;
}
}
ContinueDebugEvent(debug_event.dwProcessId,
debug_event.dwThreadId,
dwContinueStatus);
dwContinueStatus = DBG_CONTINUE;
}
}
Here is the child process
#include "stdafx.h"
#include "afxsock.h"
#include "Tlhelp32.h"
#include "afxmt.h"
#include "HERC_CMD.h"
#include "mainfrm.h"
#include "resource.h"
#include "Windows.h"
#include "MyBaseEvent.h"
#include "Show_storage.h"
#include "afx.h"
class SockCLeintThread;
#define WM_HERCGUI_MESS (WM_USER + 3)
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
INT i;
HANDLE snap_shot;
PROCESSENTRY32 process32;
BOOL return_cde;
DWORD pid;
DWORD herc_process;
#pragma optimize("",off)
LPCWSTR pipe_name = (LPCWSTR) TEXT("\\\\.\\pipe\\HercPipe");
DWORD errcd;
HANDLE myevent_read, myevent_write;
HANDLE herc_object;
UINT hercgui_commands(LPVOID lparam);
LPVOID lparam;
HANDLE mymutex;
HANDLE thread_handle, herc_thread;
#ifdef _DEBUG
CMemoryState msOld, msnew, diffMemState;
#endif
char buffer[105];
BEGIN_MESSAGE_MAP(CHERC_CMDApp, CWinApp)
END_MESSAGE_MAP()
CHERC_CMDApp theApp;
CHERC_CMDApp::CHERC_CMDApp()
{
__debugbreak();
}
BOOL CHERC_CMDApp::InitInstance()
{
void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName);
static char *thread[] = {"one", "two", "three", "four"};
static AFX_DATA const CRect rectDefaut;
static AFX_DATA const CRect rectDefault;
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
SetRegistryKey(_T("HERCCMD Hercules GUI interface"));
LoadStdProfileSettings(4); WNDCLASS wcex;
FARPROC hercgui;
LPTSTR command_line = GetCommandLine();
strncpy ((char *) &hercgui,(const char *) command_line,8);
wcex.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hIcon = LoadIcon(IDR_MAINFRAME);
wcex.hCursor = LoadCursor(IDC_ARROW);
wcex.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
wcex.lpszMenuName = MAKEINTRESOURCE(IDR_MAINFRAME);
wcex.lpszClassName = _T("HERCCMD");
wcex.hIcon = LoadIcon(MAKEINTRESOURCE(IDR_MAINFRAME));
AfxRegisterClass(&wcex);
myshow_storageptr = NULL;
AfxSocketInit(); AfxInitRichEdit();
snap_shot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
process32.dwSize = sizeof(PROCESSENTRY32);
return_cde = Process32First(snap_shot,&process32);
pid = GetCurrentProcessId();
while(pid != process32.th32ProcessID)
{
return_cde = Process32Next(snap_shot,&process32);
}
herc_process = process32.th32ParentProcessID;
my_herc = OpenProcess(PROCESS_ALL_ACCESS,FALSE,herc_process);
if (my_herc == NULL)
errcd= GetLastError();
SECURITY_ATTRIBUTES sa;
LPVOID lparam;
DWORD threadid;
sa.nLength = sizeof(sa);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
lparam = NULL;
CreateRemoteThread(my_herc,
&sa,
NULL,
(LPTHREAD_START_ROUTINE) hercgui,
lparam,
NULL,
&threadid);
filehdl = CreateFile((LPCTSTR) pipe_name,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
if (filehdl == INVALID_HANDLE_VALUE)
errcd= GetLastError();
herc_over.hEvent = OpenEvent(EVENT_ALL_ACCESS,FALSE,TEXT("herceventread"));
if (myevent_read == NULL)
errcd= GetLastError();
ResetEvent(herc_over.hEvent);
herc_over1.hEvent = OpenEvent(EVENT_ALL_ACCESS,FALSE,TEXT("herceventwrite"));
if (myevent_write == NULL)
errcd= GetLastError();
ResetEvent(herc_over1.hEvent);
herc_over.hEvent= CreateEvent(NULL,
FALSE, FALSE, NULL);
herc_over1.hEvent= CreateEvent(NULL,
TRUE, FALSE, NULL);
#ifdef _DEBUG
afxMemDF |= checkAlwaysMemDF;
msOld.Checkpoint();
#endif
mybaseeventptr = new MyBaseEvent(FALSE,FALSE,NULL,NULL);
#ifdef _DEBUG
msnew.Checkpoint();
if( diffMemState.Difference(msOld, msnew))
{
diffMemState.DumpStatistics();
diffMemState.DumpAllObjectsSince();
}
msOld.Checkpoint();
#endif
m_pMainWnd = new CMainFrame;
#ifdef _DEBUG
msnew.Checkpoint();
if( diffMemState.Difference(msOld, msnew))
{
diffMemState.DumpStatistics();
diffMemState.DumpAllObjectsSince();
}
#endif
BOOL return_code = static_cast<CFrameWnd *>(m_pMainWnd)->LoadFrame(IDR_MAINFRAME);
if (return_code == NULL)
DWORD errcd = GetLastError();
pevent = new CEvent(FALSE,FALSE,NULL,NULL);
int i;
UINT start_port;
for (i = 0, start_port = 11007; i < 4; start_port++, i++)
{
#ifdef _DEBUG
msOld.Checkpoint();
#endif
threadptr[i] = new SockCLeintThread(start_port);
#ifdef _DEBUG
msnew.Checkpoint();
if( diffMemState.Difference(msOld, msnew))
{
diffMemState.DumpStatistics();
diffMemState.DumpAllObjectsSince();
}
#endif
if (threadptr[i] == NULL)
m_pMainWnd->MessageBox((LPCTSTR)"SockClientThreadFail",NULL,MB_ICONERROR);
threadptr[i]->CreateThread(CREATE_SUSPENDED,0,NULL);
threadptr[i]->flags.is_connected = 0;
threadptr[i]->ipaddr = (LPCTSTR)"192.168.1.4";
threadptr[i]->flags.busy = 0;
SetThreadName(threadptr[i]->m_nThreadID,thread[i]);
threadptr[i]->ResumeThread();
WaitForSingleObject(*pevent,INFINITE);
}
hercthread = AfxBeginThread(hercgui_commands,(LPVOID) mybaseeventptr,THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED); hercthread->m_pThreadParams = this; hercthread->ResumeThread();
m_pMainWnd->SetWindowText((LPCTSTR) TEXT("HERCCMD"));
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
BOOL CHERC_CMDApp::OnIdle()
{
i = 1;
return TRUE;
}
#pragma optimize("",off)
UINT hercgui_commands(LPVOID lparam)
{
int i;
CString storstrg;
BOOL bresult;
UNREFERENCED_PARAMETER(lparam);
void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName);
CMutex mymutex(FALSE,(LPCTSTR)"HercLock",NULL);
CSingleLock HercLock(&mymutex);
DWORD dwbytestoread;
CHERC_CMDApp* main_app;
dwbytestoread = 1500;
MyBaseEvent *my_event;
main_app = (CHERC_CMDApp *)AfxGetApp();
my_event = main_app->mybaseeventptr;
SetThreadName(GetCurrentThreadId(),"HercGUI");
while(1)
{
WaitForSingleObject(my_event->m_hObject, INFINITE);
if (!HercLock.IsLocked())
{
HercLock.Lock(INFINITE);
WriteFile(main_app->filehdl,
(LPCVOID)my_event->buffer_ptr,
30,
NULL,
(LPOVERLAPPED) &main_app->herc_over);
}
bresult = ReadFile(main_app->filehdl,
(LPVOID) my_event->buffer_ptr,
dwbytestoread,
NULL,
(LPOVERLAPPED) &main_app->herc_over1);
WaitForSingleObject(main_app->herc_over1.hEvent,INFINITE);
HercLock.Unlock();
BOOL ret;
DWORD error;
CWnd *pwnd = CWnd::FromHandle(my_event->send_win);
ret = pwnd->PostMessage(WM_HERCGUI_MESS,(WPARAM) my_event->len,(LPARAM) my_event->buffer_ptr);
if (ret == NULL)
error = GetLastError();
i = 1;
}
return 0;
}
#pragma optimize("",on)
typedef struct tagTHREADNAME_INFO
{
DWORD dwType; LPCSTR szName; DWORD dwThreadID; DWORD dwFlags; } THREADNAME_INFO;
void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName)
{
THREADNAME_INFO info;
{
CString a("Socket thread");
a + (LPCTSTR)szThreadName;
info.dwType = 0x1000;
info.szName = (LPCSTR)a.GetBuffer();
info.dwThreadID = dwThreadID;
info.dwFlags = 0;
}
}
|
|
|
|
|
You don't seriously expect anyone to make head or tail of this?
Use the best guess
|
|
|
|
|
Ill re-do when I get home
|
|
|
|
|
Thanks Richard!
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi,
I think I found somewhat of solution there a Microsoft article
http://msdn.microsoft.com/en-us/library/vstudio/jj919165.aspx[^]
Which has a section to automically tart a process in the debugger
I created a folder for my app in
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
And from the contents menu added the name of VS debugger
After I executed the Create Process I got a Dialog Box message from Just in time debugger
as it seemed to have garbage for the app to debug
outside of the folder name where dO I put the name of the executable to debug
Thanks
|
|
|
|
|
When I do preview didn't seem to take
however it took
|
|
|
|
|