Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAxObject with FileSystemObject

QAxObject with FileSystemObject

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.0k 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.
  • G Offline
    G Offline
    gmc44
    wrote on last edited by
    #1

    Hi all,
    I would like to use this MSDN example in Qt:

    @
    var fs = CreateObject("Scripting.FileSystemObject");
    var a = fs.CreateTextFile("c:\testfile.txt", True)
    a.WriteLine("This is a test.");
    a.Close();
    @

    What i'm trying to do is:
    @
    fso = new QAxObject("Scripting.FileSystemObject", 0);
    fso->dynamicCall("CreateTextFile(const QVariant&)", QVariant("c:\temp\test1.txt"));
    fso_file = fso->querySubObject("TextStream");
    @

    The file c:\temp\test1.xls is created, but i would like to write to it. I have a runtime debug message saying:

    "QAxBase::dynamicCallHelper: TextStream: No such property in {0d43fe01-f093-11cf-8940-00a0c9054228} [FileSystem Object]
    Candidates are:"

    According to the link below, CreateTextFile returns a TextStream object... So why can't i query it?
    http://msdn.microsoft.com/en-us/library/aa265018(v=vs.60)

    No luck googling, seems like nobody tried this before.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved