Search Results

Search found 10 results on 1 pages for 'lodle'.

Page 1/1 | 1 

  • rockscroll or metalscroll for vis 2010

    - by Lodle
    Has any one found a replacement for rockscroll or metalscroll for visual studio 2010? I miss it so much that i looked into making one my self but only have word highlighting working and a place holder scroll bar and seems to be much harder than i thought it would be. Im happy to share what i got if someone is interested in helping.

    Read the article

  • Creating a MiniDump of a running process

    - by Lodle
    Im trying to make a tool for my end users that can create a MiniDump of my application if it hangs (i.e. external to the app). Im using the same code as the internal MiniDumper but with the handle and processid of the app but i keep getting error code 0xD0000024 when calling MiniDumpWriteDump. Any ideas? void produceDump( const char* exe ) { DWORD processId = 0; HANDLE process = findProcess(exe, processId); if (!process || processId == 0) { printf("Unable to find exe %s to produce dump.\n", exe); return; } LONG retval = EXCEPTION_CONTINUE_SEARCH; HWND hParent = NULL; // find a better value for your app // firstly see if dbghelp.dll is around and has the function we need // look next to the EXE first, as the one in System32 might be old // (e.g. Windows 2000) HMODULE hDll = NULL; char szDbgHelpPath[_MAX_PATH]; if (GetModuleFileName( NULL, szDbgHelpPath, _MAX_PATH )) { char *pSlash = _tcsrchr( szDbgHelpPath, '\\' ); if (pSlash) { _tcscpy( pSlash+1, "DBGHELP.DLL" ); hDll = ::LoadLibrary( szDbgHelpPath ); } } if (hDll==NULL) { // load any version we can hDll = ::LoadLibrary( "DBGHELP.DLL" ); } LPCTSTR szResult = NULL; int err = 0; if (hDll) { MINIDUMPWRITEDUMP pDump = (MINIDUMPWRITEDUMP)::GetProcAddress( hDll, "MiniDumpWriteDump" ); if (pDump) { char szDumpPath[_MAX_PATH]; char szScratch [_MAX_PATH]; time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); char comAppPath[MAX_PATH]; SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA , NULL, SHGFP_TYPE_CURRENT, comAppPath ); //COMMONAPP_PATH _snprintf(szDumpPath, _MAX_PATH, "%s\\DN", comAppPath); CreateDirectory(szDumpPath, NULL); _snprintf(szDumpPath, _MAX_PATH, "%s\\DN\\D", comAppPath); CreateDirectory(szDumpPath, NULL); _snprintf(szDumpPath, _MAX_PATH, "%s\\DN\\D\\dumps", comAppPath); CreateDirectory(szDumpPath, NULL); char fileName[_MAX_PATH]; _snprintf(fileName, _MAX_PATH, "%s_Dump_%04d%02d%02d_%02d%02d%02d.dmp", exe, timeinfo->tm_year+1900, timeinfo->tm_mon, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec ); _snprintf(szDumpPath, _MAX_PATH, "%s\\DN\\D\\dumps\\%s", comAppPath, fileName); // create the file HANDLE hFile = ::CreateFile( szDumpPath, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); if (hFile!=INVALID_HANDLE_VALUE) { MINIDUMP_CALLBACK_INFORMATION mci; mci.CallbackRoutine = (MINIDUMP_CALLBACK_ROUTINE)MyMiniDumpCallback; mci.CallbackParam = 0; MINIDUMP_TYPE mdt = (MINIDUMP_TYPE)(MiniDumpWithPrivateReadWriteMemory | MiniDumpWithDataSegs | MiniDumpWithHandleData | //MiniDumpWithFullMemoryInfo | //MiniDumpWithThreadInfo | MiniDumpWithProcessThreadData | MiniDumpWithUnloadedModules ); // write the dump BOOL bOK = pDump( process, processId, hFile, mdt, NULL, NULL, &mci ); DWORD lastErr = GetLastError(); if (bOK) { printf("Crash dump saved to: %s\n", szDumpPath); return; } else { _snprintf( szScratch, _MAX_PATH, "Failed to save dump file to '%s' (error %u)", szDumpPath, lastErr); szResult = szScratch; err = ERR_CANTSAVEFILE; } ::CloseHandle(hFile); } else { _snprintf( szScratch, _MAX_PATH, "Failed to create dump file '%s' (error %u)", szDumpPath, GetLastError()); szResult = szScratch; err = ERR_CANTMAKEFILE; } } else { szResult = "DBGHELP.DLL too old"; err = ERR_DBGHELP_TOOLD; } } else { szResult = "DBGHELP.DLL not found"; err = ERR_DBGHELP_NOTFOUND; } printf("Could not produce a crash dump of %s.\n\n[error: %u %s].\n", exe, err, szResult); return; } this code works 100% when its internal to the process (i.e. with SetUnhandledExceptionFilter)

    Read the article

  • simplifying templates

    - by Lodle
    I have a bunch of templates that are used for rpc and was wondering if there is a way to simplify them down as it repeats it self allot. I know varags for templates is coming in the next standard but can you do default values for templates? Also is there a way to handle void functions as normal functions? Atm i have to separate them and treat them as two different things every where. template <typename R> R functionCall(IPC::IPCClass* c, const char* name) { IPC::IPCParameterI* r = c->callFunction( name, false ); return handleReturn<R>(r); } template <typename R, typename A> R functionCall(IPC::IPCClass* cl, const char* name, A a) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a)); return handleReturn<R>(r); } template <typename R, typename A, typename B> R functionCall(IPC::IPCClass* cl, const char* name, A a, B b) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b) ); return handleReturn<R>(r); } template <typename R, typename A, typename B, typename C> R functionCall(IPC::IPCClass* cl, const char* name, A a, B b, C c) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c) ); return handleReturn<R>(r); } template <typename R, typename A, typename B, typename C, typename D> R functionCall(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d) ); return handleReturn<R>(r); } template <typename R, typename A, typename B, typename C, typename D, typename E> R functionCall(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d, E e) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d), IPC::getParameter(e) ); return handleReturn<R>(r); } template <typename R, typename A, typename B, typename C, typename D, typename E, typename F> R functionCall(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d, E e, F f) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d), IPC::getParameter(e), IPC::getParameter(f) ); return handleReturn<R>(r); } inline void functionCallV(IPC::IPCClass* cl, const char* name) { IPC::IPCParameterI* r = cl->callFunction( name, false ); handleReturnV(r); } template <typename A> void functionCallV(IPC::IPCClass* cl, const char* name, A a) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a)); handleReturnV(r); } template <typename A, typename B> void functionCallV(IPC::IPCClass* cl, const char* name, A a, B b) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b) ); handleReturnV(r); } template <typename A, typename B, typename C> void functionCallV(IPC::IPCClass* cl, const char* name, A a, B b, C c) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c) ); handleReturnV(r); } template <typename A, typename B, typename C, typename D> void functionCallV(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d) ); handleReturnV(r); } template <typename A, typename B, typename C, typename D, typename E> void functionCallV(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d, E e) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d), IPC::getParameter(e) ); handleReturnV(r); } template <typename A, typename B, typename C, typename D, typename E, typename F> void functionCallV(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d, E e, F f) { IPC::IPCParameterI* r = cl->callFunction( name, false, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d), IPC::getParameter(e), IPC::getParameter(f) ); handleReturnV(r); } inline void functionCallAsync(IPC::IPCClass* cl, const char* name) { IPC::IPCParameterI* r = cl->callFunction( name, true ); handleReturnV(r); } template <typename A> void functionCallAsync(IPC::IPCClass* cl, const char* name, A a) { IPC::IPCParameterI* r = cl->callFunction( name, true, IPC::getParameter(a)); handleReturnV(r); } template <typename A, typename B> void functionCallAsync(IPC::IPCClass* cl, const char* name, A a, B b) { IPC::IPCParameterI* r = cl->callFunction( name, true, IPC::getParameter(a), IPC::getParameter(b) ); handleReturnV(r); } template <typename A, typename B, typename C> void functionCallAsync(IPC::IPCClass* cl, const char* name, A a, B b, C c) { IPC::IPCParameterI* r = cl->callFunction( name, true, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c) ); handleReturnV(r); } template <typename A, typename B, typename C, typename D> void functionCallAsync(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d) { IPC::IPCParameterI* r = cl->callFunction( name, true, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d) ); handleReturnV(r); } template <typename A, typename B, typename C, typename D, typename E> void functionCallAsync(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d, E e) { IPC::IPCParameterI* r = cl->callFunction( name, true, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d), IPC::getParameter(e) ); handleReturnV(r); } template <typename A, typename B, typename C, typename D, typename E, typename F> void functionCallAsync(IPC::IPCClass* cl, const char* name, A a, B b, C c, D d, E e, F f) { IPC::IPCParameterI* r = cl->callFunction( name, true, IPC::getParameter(a), IPC::getParameter(b), IPC::getParameter(c), IPC::getParameter(d), IPC::getParameter(e), IPC::getParameter(f) ); handleReturnV(r); }

    Read the article

  • Limiting max speed of sockets

    - by Lodle
    I'm using raw sockets on windows and I'm trying to find a way to limit the max connection speed over a group of sockets. For example I have 3 sockets to 3 servers and want to limit total download speed to 1mb. I googled and cant find any thing related. Any ideas?

    Read the article

  • How do i change the start in path of a shortcut for nsis?

    - by Lodle
    I have an nsis installer script for the application im working on and it can place a shortcut on the desktop and in the start menu folder but each shortcut has the wrong start in path and as such the app saves data files to where the short cut is. Is there an easy way to change the start in path as the documentation was less than helpful on the matter? Section "Desktop Shortcut" SHORTCUT SetOutPath "$DESKTOP" CreateShortcut "${FULL_APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe" "" "$ICONDIR\${DESKICO}" SectionEnd

    Read the article

  • Flash causing crash in embeded browser

    - by Lodle
    For my work project we recently switched from visual studio 2008 to 2010 and we use an embedded instance of firefox to render webpages. The only problem we are having is that flash seems to crash the application. It seems that instead of linking dynamically to the runtime it needs its using the new 2010 one and is having issue with new and delete. Any ideas on how to fix instead of switching back to 2008?

    Read the article

  • python object to native c++ pointer

    - by Lodle
    Im toying around with the idea to use python as an embedded scripting language for a project im working on and have got most things working. However i cant seem to be able to convert a python extended object back into a native c++ pointer. So this is my class: class CGEGameModeBase { public: virtual void FunctionCall()=0; virtual const char* StringReturn()=0; }; class CGEPYGameMode : public CGEGameModeBase, public boost::python::wrapper<CGEPYGameMode> { public: virtual void FunctionCall() { if (override f = this->get_override("FunctionCall")) f(); } virtual const char* StringReturn() { if (override f = this->get_override("StringReturn")) return f(); return "FAILED TO CALL"; } }; Boost wrapping: BOOST_PYTHON_MODULE(GEGameMode) { class_<CGEGameModeBase, boost::noncopyable>("CGEGameModeBase", no_init); class_<CGEPYGameMode, bases<CGEGameModeBase> >("CGEPYGameMode", no_init) .def("FunctionCall", &CGEPYGameMode::FunctionCall) .def("StringReturn", &CGEPYGameMode::StringReturn); } and the python code: import GEGameMode def Ident(): return "Alpha" def NewGamePlay(): return "NewAlpha" def NewAlpha(): import GEGameMode import GEUtil class Alpha(GEGameMode.CGEPYGameMode): def __init__(self): print "Made new Alpha!" def FunctionCall(self): GEUtil.Msg("This is function test Alpha!") def StringReturn(self): return "This is return test Alpha!" return Alpha() Now i can call the first to functions fine by doing this: const char* ident = extract< const char* >( GetLocalDict()["Ident"]() ); const char* newgameplay = extract< const char* >( GetLocalDict()["NewGamePlay"]() ); printf("Loading Script: %s\n", ident); CGEPYGameMode* m_pGameMode = extract< CGEPYGameMode* >( GetLocalDict()[newgameplay]() ); However when i try and convert the Alpha class back to its base class (last line above) i get an boost error: TypeError: No registered converter was able to extract a C++ pointer to type class CGEPYGameMode from this Python object of type Alpha I have done alot of searching on the net but cant work out how to convert the Alpha object into its base class pointer. I could leave it as an object but rather have it as a pointer so some non python aware code can use it. Any ideas?

    Read the article

  • subscript operator on pointers

    - by Lodle
    If i have a pointer to an object that has an overloaded subscript operator ( [] ) why cant i do this: MyClass *a = new MyClass(); a[1]; but have to do this instead: MyClass *a = new MyClass(); (*a)[1];

    Read the article

1