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
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. XMLTextWriter, Files and a Class Library

XMLTextWriter, Files and a Class Library

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++comregexxml
2 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Watson
    wrote on last edited by
    #1

    Ok so I have a MC++ Class Library and it is being called from a C# app. All hunky dory, except I cannot get the class library to write to any files when it is called from the C# app. I wrote the equivalent code in the C# app and the file was created fine and in the right place. Am I supposed to be doing something extra to tell the system that the class dll can write files? The crappy thing is that no error is generated, in fact stepping through each line the system seems to think the file was created just fine. But no file appears. I am using the XMLTextWriter to write the file. e.g. myXmlTextWriter = new XmlTextWriter (S"test.xml", System::Text::Encoding::UTF8); I have used Flush and Close, no luck. So what gives? thanks. regards, Paul Watson Bluegrass Cape Town, South Africa The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge Alison Pentland wrote: I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!

    N 1 Reply Last reply
    0
    • P Paul Watson

      Ok so I have a MC++ Class Library and it is being called from a C# app. All hunky dory, except I cannot get the class library to write to any files when it is called from the C# app. I wrote the equivalent code in the C# app and the file was created fine and in the right place. Am I supposed to be doing something extra to tell the system that the class dll can write files? The crappy thing is that no error is generated, in fact stepping through each line the system seems to think the file was created just fine. But no file appears. I am using the XMLTextWriter to write the file. e.g. myXmlTextWriter = new XmlTextWriter (S"test.xml", System::Text::Encoding::UTF8); I have used Flush and Close, no luck. So what gives? thanks. regards, Paul Watson Bluegrass Cape Town, South Africa The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge Alison Pentland wrote: I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Hi Paul, Create an MC++ console test-app and put the same code into it and see if it works from there. It's prolly easier to debug too. Regards, Nish


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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