Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

igor1960

@igor1960
About
Posts
265
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I give up
    I igor1960

    29a + 39o = 1999 a + o = 61 <= because if we assume that only apples you bought, then we get 1999/29=68. and if we assume that only oranges: 1999/39=51.25 meaning that you got >=52 and <=68 overall. However, the price you paid ends with 9 (1999) -- as each cost ends with 9 (29,39) --> the multiplier must finish with 1. The only value between 52 and 68 with 1 at the end is 61. So, resolve the system 29a + 39o =1999 a+o=61 =========== 29a + 39(61-a)=1999 29a + 39*61-39a=1999 -10a=1999-39*61 -10a=1999-2379 -10a=-380 a=38 o=61-38=23 :laugh: "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    The Lounge help sales question

  • Problem adding ActiveX to an MFC DLL
    I igor1960

    You probably forgot to put AfxEnableControlContainer into your DLLs InitInstance... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC help c++ com

  • A question about CRuntimeClass and Dynamic Creation
    I igor1960

    The only reason it may not work is because you are using MFC in shared DLLs -- check _AFXDLL preprocessor definition and if it's defined you may use the following code: // search app specific classes AFX_MODULE_STATE* pModuleState = AfxGetModuleState(); AfxLockGlobals(CRIT_RUNTIMECLASSLIST); for (pClass = pModuleState->m_classList; pClass != NULL; pClass = pClass->m_pNextClass) { if (lstrcmpA(szClassName, pClass->m_lpszClassName) == 0) { AfxUnlockGlobals(CRIT_RUNTIMECLASSLIST); return pClass; } } AfxUnlockGlobals(CRIT_RUNTIMECLASSLIST); #ifdef _AFXDLL // search classes in shared DLLs AfxLockGlobals(CRIT_DYNLINKLIST); for (CDynLinkLibrary* pDLL = pModuleState->m_libraryList; pDLL != NULL; pDLL = pDLL->m_pNextDLL) { for (pClass = pDLL->m_classList; pClass != NULL; pClass = pClass->m_pNextClass) { if (lstrcmpA(szClassName, pClass->m_lpszClassName) == 0) { AfxUnlockGlobals(CRIT_DYNLINKLIST); return pClass; } } } AfxUnlockGlobals(CRIT_DYNLINKLIST); #endif For an example of usage check code for CRuntimeClass* PASCAL CRuntimeClass::Load(CArchive& ar, UINT* pwSchemaNum) in MFC ArcCore.cpp file -- above example is taken from it -- it's used to load class during serialization... It just have to work, otherwise serialization cannot be achieved... Regards, Igor "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC help tutorial question

  • A question about CRuntimeClass and Dynamic Creation
    I igor1960

    Your ModuleState has a public member m_classList that you can enumerate through to find what you want... // search app specific classes AFX_MODULE_STATE* pModuleState = AfxGetModuleState(); AfxLockGlobals(CRIT_RUNTIMECLASSLIST); for (pClass = pModuleState->m_classList; pClass != NULL; pClass = pClass->m_pNextClass) { if (lstrcmpA(szClassName, pClass->m_lpszClassName) == 0) { AfxUnlockGlobals(CRIT_RUNTIMECLASSLIST); return pClass; } } AfxUnlockGlobals(CRIT_RUNTIMECLASSLIST); Regards "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC help tutorial question

  • .NET:
    I igor1960

    Yes, I know. And I know what to do. The problem is: does average Joe know? Regards... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    The Lounge csharp question workspace

  • .NET:
    I igor1960

    Displayed for 2 hours now on my brand new machine: Setup Installing Files --- --- | | ---> | | <- flying files here... --- --- Downloading required component... Downloaded 0.00 bytes (total size unknown) of Microsoft .NET ---------------------------------------------------------- | | <- Progress Bar ---------------------------------------------------------- What should I do?... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    The Lounge csharp question workspace

  • Hook Messages: MFC HWND vs OLE control
    I igor1960

    According to Microsofts IHTMLWindow2::blur Method documentation http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/window2/blur.asp blur causes losing focus by web browser. Instead of chasing messages with spy, maybe better approach is to write an even handler for html window::onblur event and SetFocus back to web browser and possibly activate your app... As to the ways ActiveX control can negotiate with container -- they are not necessary OLE messages. I'm absolutely sure that MSFTs WebBrowser control talking to your frame window through Win32 messages too in addition to Ole ClientSite mechanism... At least that what MSFT allowes to do for themselves, while publishing rules for others... Regards... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question c++ javascript html visual-studio

  • Petri nets
    I igor1960

    What about Maria: http://www.tcs.hut.fi/Software/maria/ "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC learning

  • delayload
    I igor1960

    ...why can't you build it yourself? It must have source code... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC help csharp c++ visual-studio question

  • Hook Messages: MFC HWND vs OLE control
    I igor1960

    Instead of installing a hook, why not just dynamically subclass "Internet Explorer_Server" window? Did you try that?... As to hook and why it doesn't stop the message: Check, What hook are you using GETMESSAGE or CALLWND??? "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question c++ javascript html visual-studio

  • ActiveX storing data to be picked up by another ActiveX later?
    I igor1960

    Why can't you use local file? Temporary folder maybe good place... You can also overload OnFinalRelease or add extra LoadLibrary, so instance of your control or module will continue to stay in memory, even after IE Document Releases it... Also, as I recall CoFreeUnusedLibraries implemented by MSFT has a delay unload time of about 10 minutes -- so you can just use that -- your module stays in memory for 10 minutes, even after last instance of your control is realeased. So, you can use that by storing shared data as a static data or member of CWinApp class... Also, you can implement your own DllCanUnloadNow(void) -- just return S_FALSE -- that will guarantee that your module will stay in memory forever... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    COM com question

  • To dispatch messages of main thread in OnReceive(...) procedure of CAsyncSocket derived class
    I igor1960

    And what is your f-ing problem? What 40 years have to do with your question and my answer? $6000/month? Idiot: +/-$6000 is usual for 5 minutes off my stock account fluctuations. Now: you get back to work -- sun is high enough... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC help

  • To dispatch messages of main thread in OnReceive(...) procedure of CAsyncSocket derived class
    I igor1960

    Selected item (blue printed item) does not change when mouse pointer comes over It maybe processed in IsDialogMessage()... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC help

  • Local IPC Java App &lt;--&gt; C++ DLL
    I igor1960

    My vote: Sockets. "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question c++ java com sysadmin

  • So Last night I got around to installing VS.NET....
    I igor1960

    STA/MTA is hideous. Yes, I know the wool has been pulled over my eyes a bit on how .NET manages all this but to tell you the truth... I really don't care. Go try to write a COM object sometime that MUST be an STA (VB and ASP require it) but ALSO must be multithreaded AND be able to process Windows messages. Trust me, it's not an easy feat. You have to get down deep into the bowels of marshalling and creating your own message pumps, dealing with things you don't even wanna know about and it's a COMMON problem. If you live in a world of pure MFC and C++ it doesn't make a huge difference.... but nowadays we're all saddled with supporting lots of VB users. Excuse my ignorance here, but what particular technique could you use to implement .NET component that simultaneously supports: -- STA, MTA, Windows Messages... What would be that? From what I understand appartment threadind is global in .NET. What exactly do you mean? At least COM supports Free Thread marshalling, so Free Threaded COM component doesn't care. So, what is it in .NET that will make the same component to work purfectly well hosted in STA, MTA and as a Control??? Alot of my experience in integrating the ATL COM world with VB6 and ASP forced me to learn a LOT new things and types. It was a huge hassle when needing to be able to write a COM component that could work in a MFC application, a VB6 application, AND be useable in both VBScript and Javascript for use in ASP. Here I also confused a lot. So, your point is that in .NET you can write components easily accesible from MFC, VB6, VBScript and Javascript? If so, from what I know those one are Interop COM components. Or maybe you are trying to say that you just don't have necessaty now to support MFC, VB6, VBScript and Javascript? If so, that just means that your containers changed: but is this good by itself? So, you are now limited by supporting less poossible clients... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    The Lounge csharp c++ visual-studio question workspace

  • Threads and windowless ActiveX controls
    I igor1960

    . I want to fire an event of the control at the end of the thread If you really want to fire an event at the end of the thread, then it would be easier to just save args of your events and fire them on your main thread after secondary thread has finished. Alternatively, of course you can use interface pointer marshaling and or GIT, however you will be faced then again with troubles of thread sync, because your windowless activeX doesn't have it's own message pump. Therefore, I would suggest going with the hidden window, and I don't think it's overkill compared with interface pointer marshaling... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question com

  • arrrruuugghhhhh cyrptoapi again
    I igor1960

    I'm almost giving up. But check this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/cryptencrypt.asppadding A string, typically added when the last plaintext block is short. For example, if the block length is 64 bits and the last block contains only 40 bits, then 24 bits of padding must be added to the last block. The padding string may contain zeros, alternating zeros and ones, or some other pattern. Applications that use CryptoAPI need not add padding to their plaintext before it is encrypted, nor do they have to remove it after decrypting. This is all handled automatically So, maybe you need to increase dwLength and make it even with 8 bytes length. However, why CryptEncrypt is not failing then? Or maybe it does? "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question com linux cryptography help

  • arrrruuugghhhhh cyrptoapi again
    I igor1960

    If interested: Please provide ConvertCStringToChar() implementation.... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question com linux cryptography help

  • arrrruuugghhhhh cyrptoapi again
    I igor1960

    But according to your code with m_tContents="asdf": dwLength= _tcslen(m_tContents); // <= will give you 4 pbBuffer=(BYTE*)malloc(dwLength); // <= pbBuffer should be allocated with 4 bytes if (pbBuffer != NULL) { memcpy(pbBuffer, m_tContents, dwLength); if (CryptEncrypt(hKey, 0, true, 0, pbBuffer, &dwLength, dwLength)) // <= should encrypt just 4 bytes How you get 25, and if dwLength=25 after the call your pbBuffer is overrun! However you passed dwLength = 4, your CryptEncrypt either should fail or your pbBuffer should be overrun How are you getting 25?... Could you be more specific? "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question com linux cryptography help

  • arrrruuugghhhhh cyrptoapi again
    I igor1960

    Now I'm a little bit confused: You are saying: I pass "asdf" it encrypts to to be a length of 25 and encrypts it right. But according to your code: dwLength= _tcslen(m_tContents); pbBuffer=(BYTE*)malloc(dwLength); if (pbBuffer != NULL) { memcpy(pbBuffer, m_tContents, dwLength); if (CryptEncrypt(hKey, 0, true, 0, pbBuffer, &dwLength, dwLength)) You are only allocating 4 bytes in pbBuffer, as dwLength=4. Right? How you get 25? Maybe I missunderstanding... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    C / C++ / MFC question com linux cryptography help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups