VC++ and WinNT Problem

Discussion in 'C++' started by Raveen.B, Jul 21, 2004.

  1. Raveen.B

    Raveen.B Guest

    hi all,

    i have MSVC Project which was developed on Win 98 (quiet antique but
    true), now i move the development to Win NT. when i runt the
    application it fails with a message, "unable to create new document".
    what could be the causes of this error? but the same application if
    run in win 2k or XP is running fine.

    thanks
    Ravs
     
    Raveen.B, Jul 21, 2004
    #1
    1. Advertising

  2. "Raveen.B" <> wrote in message
    news:...
    > hi all,
    >
    > i have MSVC Project which was developed on Win 98 (quiet antique but
    > true), now i move the development to Win NT. when i runt the
    > application it fails with a message, "unable to create new document".
    > what could be the causes of this error? but the same application if
    > run in win 2k or XP is running fine.
    >


    Questions about Windows programming should be asked on a Windows programming
    group, like news:comp.os.ms-windows.programmer.win32.

    This group is for C++ questions and your question has nothing to do with
    C++.

    john
     
    John Harrison, Jul 21, 2004
    #2
    1. Advertising

  3. Raveen.B

    Howard Guest

    "Raveen.B" <> wrote in message
    news:...
    > hi all,
    >
    > i have MSVC Project which was developed on Win 98 (quiet antique but
    > true), now i move the development to Win NT. when i runt the
    > application it fails with a message, "unable to create new document".
    > what could be the causes of this error? but the same application if
    > run in win 2k or XP is running fine.
    >
    > thanks
    > Ravs


    I think that NT (4.0) is as old as 98, if not older. (But who can remember
    back that far? :)) And it was a very different OS from 95, 98, 2000 or XP.
    You have to compile explicitly for the NT in most cases, and sometimes even
    rewrite the code to work with the NT. Want advice? Drop NT, it's lifetime
    is over.

    -Howard
     
    Howard, Jul 23, 2004
    #3
  4. * Howard:
    >
    > "Raveen.B" <> wrote in message
    > news:...
    > > hi all,
    > >
    > > i have MSVC Project which was developed on Win 98 (quiet antique but
    > > true), now i move the development to Win NT. when i runt the
    > > application it fails with a message, "unable to create new document".
    > > what could be the causes of this error? but the same application if
    > > run in win 2k or XP is running fine.
    > >
    > > thanks
    > > Ravs

    >
    > I think that NT (4.0) is as old as 98, if not older. (But who can remember
    > back that far? :)) And it was a very different OS from 95, 98, 2000 or XP.
    > You have to compile explicitly for the NT in most cases, and sometimes even
    > rewrite the code to work with the NT. Want advice? Drop NT, it's lifetime
    > is over.


    Off-topic except the degree to which C++ development is influenced by
    system support might be sort of on-topic, e.g. NT provides better
    checking of invalid pointer usage.

    <OT>
    The Explorer GUI was introduced in Windows 95 and subsequently made
    available on Windows NT, then in version 4. Windows 2000 is NT 5.0,
    Windows XP home and professional is NT 5.1, and XP Server is 5.2.
    It's a bit difficult to drop NT for Windows programming since it's
    the current Windows.
    </OT>


    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Jul 23, 2004
    #4
  5. Raveen.B

    JKop Guest

    Up until WinXP, all home editions of Windows were ASCII
    while the office editions were Unicode. Both operating
    systems have:

    MessageBoxExA
    MessageBoxExW

    But on the home editions, the W one is a dummy. While on
    the office editions, both work. Consequently, WinNT progs
    simply *won't* work on normal Windows 98, but Win98 progs
    *will* run on WinNT.

    Now, with WindowsXP, everything's Unicode. If you call an A
    function, then:

    blah AFunction(blah)
    {
    Convert();
    WFunction();
    }

    This is the opposite of how WinNT dealed with Win98 progs.

    -JKop
     
    JKop, Jul 23, 2004
    #5
  6. * JKop:
    > [incorrect]


    Get the facts straight at least if you must post off-topic.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Jul 23, 2004
    #6
  7. Raveen.B

    JKop Guest

    Alf P. Steinbach posted:

    > * JKop:
    >> [incorrect]

    >
    > Get the facts straight at least if you must post off-

    topic.
    >


    This is the part where you correct me, and then I respond
    with either "Yeah, you're right", or "Shutup".

    Shutup.


    -JKop
     
    JKop, Jul 24, 2004
    #7
  8. Raveen.B

    Mike Smith Guest

    JKop wrote:

    > Consequently, WinNT progs
    > simply *won't* work on normal Windows 98, but Win98 progs
    > *will* run on WinNT.


    Not only is this off-topic, it's patently false. The default use of
    ANSI vs. Unicode API calls is determined by the compiler, not by the OS.
    If you #define UNICODE then the API calls resolve to Unicode
    functions, otherwise they resolve to ANSI functions. It is entirely
    possible to build Win32 executables that will run as-is on everything
    from Win95 through Longhorn.

    --
    Mike Smith
     
    Mike Smith, Jul 26, 2004
    #8
  9. Raveen.B

    JKop Guest

    Mike Smith posted:

    > JKop wrote:
    >
    >> Consequently, WinNT progs
    >> simply *won't* work on normal Windows 98, but Win98

    progs *will* run
    >> on WinNT.

    >
    > Not only is this off-topic, it's patently false.


    False.

    > The default use of
    > ANSI vs. Unicode API calls is determined by the compiler,

    not by the OS.

    False, it's determined by which you call.

    MessageBoxA
    MessageBoxW

    There's no such Win32API function "MessageBox". It's very
    possible that you possess a certain header file that maps
    MessageBox to MessageBoxW via a macro or a function.

    > If you #define UNICODE then the API calls resolve to

    Unicode
    > functions, otherwise they resolve to ANSI functions.


    ....with a certain header file.

    > It is entirely
    > possible to build Win32 executables that will run as-is

    on everything
    > from Win95 through Longhorn.


    It's very possible to do so with any Win32 compiler.
    Compile a Win32 program that uses a function like:

    GetWindowTextW

    Run the program on Win95 -> Win Millenium

    The function will not do anything and the return value
    won't mean anything, it's a dummy.

    Run it on Win NT 4 -> Win 2000

    It will run perfectly.

    There's but one "W" function that will function on Win95 ->
    Win Millenium and that's "MessageBoxW".

    As for Windows XP. All versions of it have functional W and
    A functions, although the A functions just perform a
    conversion and call the W version, because WinXP is
    Unicode. This is exactly what Windows NT did when you
    called an A function.

    -JKop
     
    JKop, Jul 26, 2004
    #9
  10. Raveen.B

    Mike Smith Guest

    JKop wrote:

    > Mike Smith posted:
    >
    >
    >>JKop wrote:
    >>
    >>
    >>>Consequently, WinNT progs
    >>>simply *won't* work on normal Windows 98, but Win98

    >
    > progs *will* run
    >
    >>>on WinNT.

    >>
    >>Not only is this off-topic, it's patently false.

    >
    >
    > False.
    >
    >
    >>The default use of
    >>ANSI vs. Unicode API calls is determined by the compiler,

    >
    > not by the OS.
    >
    > False, it's determined by which you call.
    >
    > MessageBoxA
    > MessageBoxW
    >
    > There's no such Win32API function "MessageBox". It's very
    > possible that you possess a certain header file that maps
    > MessageBox to MessageBoxW via a macro or a function.


    Uh, yeah, and that's how the Win32 SDK has come ever since NT 3.1, so I
    didn't think it was worth mentioning - i.e. any decent Windows
    programmer *knows* that already.

    >> If you #define UNICODE then the API calls resolve to
    >> Unicode
    >>functions, otherwise they resolve to ANSI functions.

    >
    > ...with a certain header file.


    Uh, yeah - the one supplied *by Microsoft* for *their* OS, since the
    early '90s.

    >>It is entirely
    >>possible to build Win32 executables that will run as-is
    >>on everything
    >>from Win95 through Longhorn.

    >
    >
    > It's very possible to do so with any Win32 compiler.
    > Compile a Win32 program that uses a function like:
    >
    > GetWindowTextW
    >
    > Run the program on Win95 -> Win Millenium
    >
    > The function will not do anything and the return value
    > won't mean anything, it's a dummy.
    >
    > Run it on Win NT 4 -> Win 2000
    >
    > It will run perfectly.
    >
    > There's but one "W" function that will function on Win95 ->
    > Win Millenium and that's "MessageBoxW".
    >
    > As for Windows XP. All versions of it have functional W and
    > A functions, although the A functions just perform a
    > conversion and call the W version, because WinXP is
    > Unicode. This is exactly what Windows NT did when you
    > called an A function.


    And using the ...A() version of the function, with ANSI strings, will
    perform correctly on all Windows versions, like I *said*.

    --
    Mike Smith
     
    Mike Smith, Jul 26, 2004
    #10
  11. Raveen.B

    JKop Guest

    Mike Smith posted:

    > And using the ...A() version of the function, with ANSI

    strings, will
    > perform correctly on all Windows versions, like I *said*.
    >
    > --
    > Mike Smith



    Back in the day, if one wanted to write a thoroughly
    efficent prog for WinNT, they'd use the W functions. The
    resulting executable wouldn't do anything on Win95 -> Win
    Millenium.

    End of discussion.

    -JKop
     
    JKop, Jul 27, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lathe_Biosas
    Replies:
    8
    Views:
    841
    Joe Wright
    Sep 2, 2005
  2. Ashok
    Replies:
    0
    Views:
    262
    Ashok
    Apr 26, 2007
  3. Thauhtopa
    Replies:
    1
    Views:
    227
    Thauhtopa
    Dec 7, 2004
  4. Blake
    Replies:
    2
    Views:
    280
    Egbert Nierop \(MVP for IIS\)
    Jun 1, 2004
  5. Michael

    Strange file opening problem on WinNT

    Michael, Oct 23, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    131
    Michael
    Oct 23, 2003
Loading...

Share This Page