Re: Change the font



I don't pass unicode string in function of dll. I pass ANSI string.
I have also tried by taking a unicode string and converting it to ansi
string by Widechartomultibyte. but don't get success.
"VKumar" <cmanoj@xxxxxxxxxxxxxxx> wrote in message
news:#FsM#muYGHA.4060@xxxxxxxxxxxxxxxxxxxxxxx
OK
What i am doing? I have a dll. This dll has a function which takes a
string
as input and display it in a message box( or on a dialog box). I don't
have
code of this dll. I use this dll by loadlibrary then i call that function
of
dll which takes string as input.
In my MFC application, first i load the dll by loadlibrary then i call
function of dll and pass a string. This function display that string in a
message box.But i don't see correct string in message box which i passed,
i
see some garbage value. I think this is the problem of font. If i change
the
font of string in my MFC application and i pass it in dll function then
the
dll function will display the correct string .

Actually my MFC application is Unicode application and dll is ANSI
application. So i need to change the font of string which i passed. I took
this dll from an organization so i don't have code of this dll and i have
only this option to use the dll.



"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:uwXDvWuYGHA.4760@xxxxxxxxxxxxxxxxxxxxxxx
VKumar wrote:
I don't want to use the string on dialog box. I am sending this string
from
exe to dll. My application is MFC application. This application use a
dll. I
pass this string from application to dll in a function of dll. String
is
displaying as garbage in dll. If i change the font of string in exe
and
pass
this to dll then the string will display correctly in dll function. I
don't
have code of dll. I use dll by LoadLibrary.

This a not clear. DLLs do not have a font, and strings do not have a
font. Can you explain what you mean by "change the font of string?"

--
Scott McPhillips [VC++ MVP]





.



Relevant Pages

  • Re: Microsoft Layer for Unicode on Windows 95/98/Me systems
    ... >> then back to ANSI again for the API call. ... >> unicode string that VB is using. ... is pointing to a unicode string. ... > creates toolbar/menu and inserts code), and installs the referenced DLL. ...
    (microsoft.public.vb.winapi)
  • Re: Explicit Linking of DLLs in VB.net
    ... yes this technique will only work on managed assemblys (exe or dll) ... "YourObject" is a form and is limited to the form methods. ... Wel implement propertys, methods, events in your interface and start ... Public Shared Function LoadMeByName(ByVal vstrAssemblyName As String, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Explicit Linking of DLLs in VB.net (attn Michel or any others)
    ... loads the dll and finds a form in the dll. ... Dim extForm As Form = extAssembly.CreateInstance("test.entry", ... Wel implement propertys, methods, events in your interface and start ... Public Shared Function LoadMeByName(ByVal vstrAssemblyName As String, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Access crashes when calling DLL function.
    ... I have started bypassing code in the form to find the problem. ... are local String variables. ... I then built a simple input form (in the same mdb) that calls the crashing ... functions from a DLL they provide. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Populating CString in Win32 dll interface that accepts LPCTSTR
    ... ReleaseBuffer() if I actually modify the buffer after GetBuffer is called ... But the OP wanted the string to be "populated" by the DLL. ... Unicode or ANSI string, but the DLL might think it is a non-const pointer to an ANSI ...
    (microsoft.public.vc.mfc)