Roger Rehr | 2 Sep 09:08
Picon

problems getting inpout32.dll working with qt3 for windows

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.

I played with the code by temporarily adding #install "windef.h" from 
linrad-02.37, and then began getting on 'make' and 'mingw32-make' reams 
of errors of the type:

C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h:64: 
error: `WCHAR' does not name a type
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h:65: 
(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)

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)

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)

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)

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 08:33
Picon

xp64 and mingw and linrad

Hello, All,

After Bob asked about MinGW under XP64, I belatedly figured out that I 
should give some information on Linrad and XP64.

If I compile Linrad.exe under Ubuntu Linux, 64 bit version, it will run 
OK on windows XP64, with occasional crashes.  It accesses the printer 
port at 33792 OK, so I can control the WSE hardware under XP64.

If I try to compile Linrad for XP64 on XP64, MinGW starts out fine, but 
the compile doesn't finish, as NASM does not work under XP64 [this is 
well-known].

The compile ends with a windows error message:

The program or feature "\??\C:\mingw\bin\nasm.exe" cannot start or run 
due to incompatibility with 64-bit versions of Windows".

There is a replacement for NASM called YASM, that does work under XP 
64, but when I run it the compile ends with the error:

"
c:\mingw\bin\nasm -w-orphan-labels -fwin32 -s split.sw -o split.oz
split.sw:58:  global EQU value not an integer expression
"

with several instances of this type of error message.

So I haven't been able to compile linrad.exe for XP64 under windows, 
although I have done so under Linux.
(Continue reading)

Prinz, Georg | 3 Sep 09:54
Picon

Computer hw for linrad

Good morning dear Oms,

As I'am going to become a fulltime ham, I have to update my computer and
to learn linux/ubuntu. Therefore I would like to know if anybody could
give me a hint to following questions:
1. Which cpu and type of board should I collect?
2. Is the delta44 sound card still the favorite one, or is there
nowadays a better one available (e.g. by HPSDR)?
3. Amount of memory( 1Gbyte or more)?
4. Which development tools are necessary if I will write add-ons (C is
not a problem for me)?
Best regards and vy 73
Georg, dl2kp

#############################################################
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 <at> antennspecialisten.se>
To switch to the INDEX mode, E-mail to <linrad-index <at> antennspecialisten.se>
Send administrative queries to  <linrad-request@...>

Roger Rehr | 3 Sep 13:16
Picon

there is a mingw-w64 for windows

I believe the reason my code won't run properly when I call the 
inpout32 dll may be that the version of mingw I am using [and that is 
commonly available] will run on 64 bits but will not handle 64 bit 
dlls, etc.

There is a mingw that is really 64 bit code that can be downloaded from:

http://sourceforge.net/projects/mingw-w64/

It may well need to be compiled under Linux.

I post this for those interested.

73,

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

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

#############################################################
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)

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@...>


Gmane