Re: istream::good() in a dll

From: Carl Daniel [VC++ MVP] (cpdaniel_remove_this_and_nospam_at_mvps.org.nospam)
Date: 03/05/05


Date: Fri, 4 Mar 2005 16:27:22 -0800

William DePalo [MVP VC++] wrote:
> "Andreas Hildebrandt" <a.hildebrandt@handshake.de> wrote in message
> news:d0asvs$pjh$01$1@news.t-online.com...
>> I am afraid I am quite a novice to all Windows - specific
>> stuff, so please excuse my naive terminology. :-)
>
> Roger that.
>
>>
>> In our library, we have a string handling class, which contains the
>> following piece of code:
>> ...
>> everything works perfectly. But as soon as I compile the library as
>> a dll, f.good() does nothing.
>
> What is probably happening is that the execuatble and the DLL are
> built against different instances of the runtime. If you want to
> share runtime "widgets" across a DLL boundary then the executable and
> DLL must be built against the same "flavor" of the DLL BASED runtime.
> By "flavor" I mean that you must use the same debug/nodebug and
> single/multithreaded version in each.

He's already building everything with /MD (he thinks). Must be something
else (unless he's not really building everything with /MD).

-cd



Relevant Pages

  • Re: IIS permissions error sporadically occurs
    ... I may have found the answer Roger. ... So I believe I did in fact have a name conflict. ... > I am not so sure abont there being no error in their dll. ... > to intercept that and recycle that app. ...
    (microsoft.public.windows.server.security)
  • Re: Sending a UserRegistered Message from a dll to the main applicaition
    ... Christopher J. Holland ... "Christopher J. Holland" wrote in message ... > Christopher J. Holland [!MVP] ... >>>HWND in the DLL by, for example, a call to GetLastActivePopup or some ...
    (microsoft.public.vc.mfc)
  • Re: Using a DLL without a library / stdcall / WinAPI
    ... > synonym for __stdcall, which always evaluates right-to-left. ... C uses C calling convention. ... >>the DLL. ... >>> Christopher J. Holland [!MVP] ...
    (microsoft.public.vc.mfc)
  • Re: Word not opening my file
    ... It sounds like the DLL for the Office Plug-in is still be registered. ... Microsoft Office MVP ... this which was par t of Office SP3 and on installation, ... i even did the registry thing it suggested ...
    (microsoft.public.word.application.errors)
  • Re: Loosing XP style on execustion
    ... floating-point bug in the CPU that needs a library workaround, then suddenly having a DLL is much better. ... Even if my app should actually depend on a bug in some DLL, although I would like to know about it, I would prefer to find out from an update in the compiler, or a new version of the compiler, not from a bunch of users complaining that my app no longer works after the latest Windows Update. ... Visual C++ MVP ...
    (microsoft.public.dotnet.languages.vc)