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
A

Andy H

@Andy H
About
Posts
173
Topics
112
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CFormView derived non-resizeable
    A Andy H

    I am currently writing an MDI app', with views based upon the CFormView. Could someone kindly let me know how I can set these formViews so that they are non -resizeable? Thanks.

    C / C++ / MFC question

  • Import data and compile dll
    A Andy H

    I would appreciate some advise. I need to import some data into a list and incorporate this list of static data into a DLL. Can anyone advise how you would go about doing this please?

    C / C++ / MFC question

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    Just like I missed your link ;-)

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    The link was in my message (at the bottom) where I explained I had worked out the EXEC_C14N output. Here it is :-)

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    When you Canonicalize an XML sub-document you need to ensure that the namespace declarations used within that node but which were originally declared in an ancester node you need to re-declare in the node in which the namespace is being used in the sub-document. Then having done that you need to ensure that the namespace declarations are in order as per their prefix, AND any attributes but not in alphabetical order of the attribute or its prefix (if used) but per the order of the URI of that prefix... Get it!!! Having solved that I have a much larger XML node structure extracted from the orginal XML document to sort out along the same lines. All good fun. If you read the page to which I gave a link it makles it clearer, much clearer than many books I have read on Canonicalization.

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    Just to let anyone know, if they are interested, that I have manually worked out the result of the EXEC-C14N for the //ns1:Operation node of the XML posted in my orriginal message above, to be: [code] <ns1:Operation xmlns:ns1="http://www.ros.ie/schemas/service/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="MsgOperation" soapenv:mustUnderstand="0" xsi:type="xsd:string">CT1/File</ns1:Operation> [/code] This helped

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    I tried that, didn't work. I will be working on it further tomorrow. If I get it to work I will post what I did to resolve the issue.

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    I am currently parsing NULL to both those arguments. But because I am extracting the node with the Id attribute set to "MsgOperation", I am obviously missing namespace declarations etc that are in the parent node, as a result my computed DigestValue is incorrect. All I require at the moment is for someone to let me know what the EXEC_C14N result of the said node which is then fed into the SHA-1 algorithm and Base64'ed the result of which (i.e. DigestValue) is: wJsL4RtLToFeHW/xt2ewbAAiNxk= That way at least I could get some idea of what the node is transformed into as a result of the EXEC_C14N process!

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    I am very sorry, I did not spot the link in your reply. Thanks, but I have seen the page you referred to.

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    Well what was the point of your reply? How f******* stupid.

    XML / XSL xml help csharp c++ wcf

  • Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED
    A Andy H

    I am trying to digitally sign an XML document in C++. Yes, I know that it is easy in .NET 2.0, but alas cannot use that! An extract of the XML document is below. All I am trying to do is calculate the DigestValue over the XML sub-document with Id=MsgOperation. I know that the data from this sub-document is converted into a hash with SHA-1 and then Base64. The problem I am having is converting the sub-document using EXEC-C14N. I am trying to use the LibXML2 library (very good), to EXEC-C14N the sub-document with: [code] CString CDigitalCerts::C14N( const char* pszXml, const bool bExclusive ) { CString sRet = _T(""); xmlChar* pOutput = NULL; xmlDocPtr pXmlDoc = xmlReadMemory( pszXml, (int)strlen( pszXml ), _T("xml"), NULL, 0 ); int result = 0; void* pData = NULL; xmlOutputBufferPtr buf = 0; if ( pXmlDoc ) { result = xmlC14NDocDumpMemory( pXmlDoc, NULL, (int)bExclusive, NULL, 0, &pOutput ); } xmlFreeDoc( pXmlDoc ); if ( result > 0 ) { sRet = (LPCTSTR)pOutput; } xmlFree( pOutput ); pOutput = NULL; return sRet; } [/code] If anyone has used the xmlC14NDocDumpMemory function before from the libxml2 library and can advise what I need to add to its 2nd argv (nodes) or the 4th argv (inclusive_ns_prefixes), I would appreciate it. Or what the node once EXEC_C14N'ed looks like I would again be very grateful. [code] <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> soapenv:Header <ns1:Operation Id="MsgOperation" soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="http://www.ros.ie/schemas/service/" xmlns:xsi="http://w ww.w3.org/2001/XMLSchema-instance">CT1/File</ns1:Operation> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"> ... <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> ds:SignedInfo <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#MsgOperation"> ds:Transforms

    XML / XSL xml help csharp c++ wcf

  • XSD:PATTERN question
    A Andy H

    Could someone please explain what the following XSD extract does:

    <xsd:simpleType name="registration">

    • <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{1,8}[A-Wa-w][TWXtwx ]?" />
      <xsd:pattern value="[7-9][A-Wa-w][0-9]{5}[A-Za-z]" />

    Thanks

    XML / XSL question regex

  • Can your car (door) do this?
    A Andy H

    I don't think you will think it so good when you open the door in a howling gale and then find that you have sopping wet seats and puddles on the floor.

    The Lounge com tools question

  • atof() losing precision
    A Andy H

    When numbers are larger than 15 significant figures the function atof() is losing precision. For example: double dVal = atof( pszValue ); // where pszValue holds the string "1111111111111111" dVal ends up with 1.11111111111111e+15 which equates to: 1111111111111110 Can anyone suggest a safer way to convert the char* to a double?

    C / C++ / MFC tutorial question

  • move up call stack one level
    A Andy H

    Thanks, I hadn't thought of assembler code. The following did the trick: unsigned* my_ebp; __asm { mov eax, ebp mov dword ptr [my_ebp], eax }

    C / C++ / MFC question data-structures performance tutorial

  • move up call stack one level
    A Andy H

    I am writing code to track down memory leaks in our program. I am doing this by overloading the new(size_t), new[](size_t), delete(size_t) and delete[](size_t) functions so that I can keep track of which calls to new do not have a corresponding delete. This is all working well. Now to my question, try as I might I cannot get the callers __FILE__ and __LINE__ information which I also need. I have tried #define new new(__FILE__,__LINE__) etc... but this is not compatible with existing code. I therefore feel that at some point in the call to new and new[], etc... that I need to move up the call stack a level to the caller so as I can obtain the __FILE__ and __LINE__ information from the stack page of interest. Does anyone have any example code of how this can be done, please?

    C / C++ / MFC question data-structures performance tutorial

  • Visual Studio 2005 SP2 & Debugging MFC DLL
    A Andy H

    Thanks, I'll give it a go.

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

  • Visual Studio 2005 SP2 & Debugging MFC DLL
    A Andy H

    Yes, the projects .PDB file is output to the same folder in which my debug DLL is located as well as the EXE being run from which the DLL is called. I can debug the VS2003 version of the DLL fine, just when I convert the DLL project to VS2005 and build in debug mode I cannot debug. I have even set the Debuggong | Symbols | location to the path to the .pdb, but alas not able to hit my breakpoints! I am sure there is a bug in VS2005 being unable to debug MFC DLL's!!! But would welcome anyone who has managed to debug an MFC DLL in VS2005.

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

  • Visual Studio 2005 SP2 & Debugging MFC DLL
    A Andy H

    I have an MFC DLL project written in VS2003. I upgraded it to VS2005 SP2 and successfully build the DLL, despite setting the project options to use the projects .PDB I am unable to debug the DLL. I was able to debug happily with VS2003 but CANNOT debug with VS2005! I have rolled back to VS2003 as until I can debug I will not be using VS2005. Has anyone else had this problem with VS2005, and did you manage to debug a DLL?

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

  • Reading excel worksheet from clipboard
    A Andy H

    Does anyone know of any methods for successfully reading an Excel worksheet that has been copied to the clipboard? It would need to be in BIFF8 format.

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

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