[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linrad] 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 NOT intuitive and I was not making headway. Therefore, me dufus ;)



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

Well, I am not sure about MSYS. But I was able to compile QT3 under XP64 with no problem, and to compile my WSE control application with the exception of the DLL reference. The executable WSE controller runs fine and all functions work except for actual printer control, since I can't get the DLL working.

I have MSYS installed with no errors, but don't know what it does and thus don't know if it is working.


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.

Yes. As Leif pointed out, Although my code used LoadLibrary, the compiler referenced LoadLibraryW. And I was not able to cast my way out of the WCHAR* vs char* quandry, although I tried both static and dynamic casts.

One thing I've wondered is if MinGW actually allows one to call dll's from within C== code. Maybe that is only permitted with Microsoft C++ products?

Anyway, this weekend I learned way more about wchar_t vs char and Unicode vs ANSI than I ever wanted to know ;)

I am going to try Chris's suggestion when I get back home. I have been at Hilltop all day mouseproofing my FT1000MP Mk V and reassembling the station with an eye towards minimizing the rework necessary when my Flex-5000 arrives ;)

I have tried to install QT3 for MSVC2005 but the install has MAJOR problems with finding the includes and libraries that I haven't been able to solve yet.

As the scarecrow sang, "IF I ONLY HAD A BRAIN" I'd likely have had this working long ago using QT4 as you suggested :)

Thanks again Bob, and have a great Labor Day Holiday, and

73,

Roger
W3SZ


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 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@xxxxxxxxxxx>:

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.

QT3-designer compiles and runs, and my wsecontrol application compiles
fine until I try to add the inpout32.dll to it.  When I add the lines:

HINSTANCE h_inpout;
h_inpout =    LoadLibrary("C:\inpout32\Win32\npout32.dll");

to my progam without adding an #include <windows.h> I of course get an
error message on 'make' that LoadLibrary is undeclared.

When I added an #include <windows.h> I got for several hours today when
running 'make' or 'mingw32-make' an error that
char* could not be converted to WCHAR* in HINSTANCE.  I am not able to
take care of this by using an intermediate variable, nor by attempting
a static_cast or dynamic_cast.


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


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




--
AMSAT Director and VP Engineering. Member: ARRL, AMSAT-DL,
TAPR, Packrats, NJQRP, QRP ARCI, QCWA, FRC. ARRL SDR WG Chair
"If you're going to be crazy, you have to get paid for it or
else you're going to be locked up." Hunter S. Thompson

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



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


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

LINRADDARNIL