Alberto di Bene | 3 Sep 23:25
Picon

Re: problems getting inpout32.dll working with qt3forwindows

Roger Rehr wrote:
> 
> I haven't found a  page that explains the "L" syntax, but I have now 
> found many examples of it, and not just with LoadLibrary, but more 
> generally when an external windows dll or process is being passed text 
> of some form from within a C++ program.

Hi Roger,

    if you go to this page :
http://msdn2.microsoft.com/en-us/library/7dzey6h6(VS.80).aspx

you can find this explanation for L"xxx"

--------------
L (converts following character or string to its Unicode counterpart)
--------------

73  Alberto  I2PHD

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <linrad@...>.
To unsubscribe, E-mail to: <linrad-off@...>
To switch to the DIGEST mode, E-mail to <linrad-digest@...>
To switch to the INDEX mode, E-mail to <linrad-index@...>
Send administrative queries to  <linrad-request@...>

Roger Rehr | 3 Sep 07:13
Picon

Re: problems getting inpout32.dll working with qt3forwindows

Hi, Bob, Leif, Chris and all,

It turns out that Chris's suggestion of changing the syntax of the 
LoadLibrary statement by putting an L in front of the "C:\..." did the 
trick and with that the program compiles with no errors.

I am now at the stage of getting a runtime fatal error when I insert 
the function call to oup32fp, but everything up to that step works 
fine, so I am getting closer ;)

Thanks Chris for the tip!!  I am quite certain I would NOT have 
discovered that anytime soon.  I had gone right by code using that 
syntax. ;)

I haven't found a  page that explains the "L" syntax, but I have now 
found many examples of it, and not just with LoadLibrary, but more 
generally when an external windows dll or process is being passed text 
of some form from within a C++ program.  Here are some other examples 
for the interested:

x.bstrVal = ::SysAllocString(L"C:\\Doc1.doc");

HRESULT hr = CLSIDFromProgID(L"Word.Application", &clsid);

AutoWrap(DISPATCH_PROPERTYPUT, NULL, pPropSubject, L"Value", 1, x);

wprintf(L"Failed calling ITask::SetWorkingDirectory: ");

lpcwszTaskName = L"Test Task";

(Continue reading)

Roger Rehr | 3 Sep 00:12
Picon

Re: problems getting inpout32.dll working with qt3forwindows

Hi, Bob,

Thanks for the response!  I took a holiday today from this problem to 
go up to Hilltop so I haven't done anything more since my first 2 posts 
;)

I will answer below, in-line with your questions.

> Are you using the commercial licensed copy of Qt3 or are you attempting
> to build using Qt3 under MinGW?

I built QT3 under MinGW, it worked fine until my attempt to use the dll.

>
> If it is the latter,  I really do suggest you use Qt4 but forget that
> for the moment.  Tell us why you are not using Qt4?
>

Well, the reason I used QT3 instead of QT4 basically is because "I am a 
lazy dufus" ;)

I built my WSE controller in Linux using QT3 a year or so ago, and I 
also built a little widget to control my SDR-1000 in Linux using QT3.  
So I learned QT3 and know how to use it, and already had the WSE 
controller app all done in QT3, so if I hadn't run into this dll 
problem, it would have been an easy job; just substitute the inpout32 
statements for the Linux print statements and things are done.  The 
lazy part is because I didn't want to have to rewrite the program, and 
the dufus part is because when I looked at QT4 and tried to start 
redoing the WSE controller in QT4 the transition from QT3 to QT4 was 
(Continue reading)

Robert McGwier | 2 Sep 19:39
Picon

Re: problems getting inpout32.dll working with qt3 forwindows

Roger:

I am somewhat confused since I believe we have incomplete information. 
You mention Qt3.  I have several questions.

Are you using the commercial licensed copy of Qt3 or are you attempting 
to build using Qt3 under MinGW?

If it is the latter,  I really do suggest you use Qt4 but forget that 
for the moment.  Tell us why you are not using Qt4?

Are you able to run MSYS and mingw under Windows XP 64?

WCHAR is a 16 bit unicode character and char is an 8 bit quantity.  You 
are in a bit of a bother I would say.

Thanks,
Bob

Roger Rehr wrote:
> Hello, All,
> 
> After getting a good 3 hours sleep the obvious hit me [and worked better 
> to get me out of bed than the alarm clock]:
> 
> the reason for the changed behavior was that I had left a modified 
> windef.h file from Linrad in the PATH.  After removing it I am back to 
> the previous behavior, getting the error message:
> 
> form.ui.h:30:  error: cannot convert 'const char*' to 'constWCHAR*' for 
(Continue reading)

Leif Asbrink | 2 Sep 18:06

Re: problems getting inpout32.dll working with qt3 forwindows

Hi Roger,

> the reason for the changed behavior was that I had left a modified 
> windef.h file from Linrad in the PATH.  After removing it I am back to 
> the previous behavior, getting the error message:
> 
> form.ui.h:30:  error: cannot convert 'const char*' to 'constWCHAR*' for 
> argument '1' to 'HINSTANCE__* LoadLibraryW<const WCHAR*>'

Unfortunately I have no idea what to do. Why you get a message
about LoadLibraryW and not LoadLibrary for example.

But I have done one thing : The file windef.h of Linrad is now
renamed to wdef.h so it will never again be confused with Windows
own system files.

> Again, sorry for the bandwidth, but any help is appreciated!
Sorry, hope someone else can help.

73

Leif / SM5BSZ

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <linrad@...>.
To unsubscribe, E-mail to: <linrad-off@...>
To switch to the DIGEST mode, E-mail to <linrad-digest@...>
To switch to the INDEX mode, E-mail to <linrad-index@...>
Send administrative queries to  <linrad-request@...>
(Continue reading)

Roger Rehr | 2 Sep 13:38
Picon

Re: problems getting inpout32.dll working with qt3 forwindows

Hello, All,

After getting a good 3 hours sleep the obvious hit me [and worked 
better to get me out of bed than the alarm clock]:

the reason for the changed behavior was that I had left a modified 
windef.h file from Linrad in the PATH.  After removing it I am back to 
the previous behavior, getting the error message:

form.ui.h:30:  error: cannot convert 'const char*' to 'constWCHAR*' for 
argument '1' to 'HINSTANCE__* LoadLibraryW<const WCHAR*>'

Again, sorry for the bandwidth, but any help is appreciated!

73,

W3SZ
Roger Rehr
http://www.nitehawk.com/w3sz

Quoting Roger Rehr <w3sz@...>:

> Hello, All,
>
> This is somewhat off topic, but not really as I am trying to make an
> external program to control my SM5BSZ WSE boxes in windows XP64.  They
> are nicely controlled via Linrad running under Windows XP64, but I am
> having trouble compiling and linking the windows version of QT3 to get
> my separate controller running.
>
(Continue reading)


Gmane