Visual Studio 2013 question (solved)

Visual Studio 2013 question (solved)

Postby Antonio Linares » Wed May 28, 2014 6:00 pm

Has someone been able to build a FWH 64 and Harbour 64 app using Visual Studio 2013 ?

It seems as the dektop is no longer supported (I may be wrong, hopefully...)

With Visual Studio 2012 it works fine as expected :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question

Postby rhlawek » Thu May 29, 2014 4:55 am

Antonio, I am successfully using Visual Studio Express 2013 and Visual Studio 2013 Professional to build 64 bit harbour itself, as well as 64 bit FWH apps using the two library files you provide with FWH64.

I think that was your question.

Robb
User avatar
rhlawek
 
Posts: 193
Joined: Sun Jul 22, 2012 7:01 pm

Re: Visual Studio 2013 question

Postby Antonio Linares » Thu May 29, 2014 5:05 am

Robb,

yesterday I published a makefile for FWH 64 using multiple PRGs and Visual Studio 2012:
viewtopic.php?f=3&t=28527

Would you mind to point what changes in that makefile (also please review go.bat settings) would be needed to use Visual Studio 2013 Express ?

many thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question

Postby rhlawek » Thu May 29, 2014 2:57 pm

I will, but it won't be until very late tonight.

I did just find one issue with a 64 bit FWH app, drag and drop doesn't seem to work. A 32 bit app works, but the same code compiled for 64 bit always passes an empty array as the third parameter.

Robb
User avatar
rhlawek
 
Posts: 193
Joined: Sun Jul 22, 2012 7:01 pm

Re: Visual Studio 2013 question

Postby Antonio Linares » Thu May 29, 2014 3:33 pm

Robb,

Please take your time, thanks

Do you have the Visual Themes working on 64 bits ? I mean the 1 24 "WindowsXP64.manifest"

Regarding the bug, could you please point me to an existing FWH example for it, or an example of your own ? many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question

Postby rhlawek » Thu May 29, 2014 8:37 pm

I use a manifest, but not with the XP manifest you've shown. I'll test with that later tonight. One thing that may be worth your while is use the Microsoft sxstrace utility to verify the manifest. I had one particular manifest I've used for a long time, but was having trouble recently with Windows 8.1, and found a number of errors with sxstrace. Nothing difficult to fix, but I didn't even know there were any errors until I used sxstrace, just unexpected behavior.

Regarding drag and drop:

c:\fwh\samples\testdrop.prg shows the drag and drop problem. Works fine for 32 bit, fails as below for 64 bit. In my app where I found this I saw that in 64 bit the aFiles array is always empty.

Also, The log below shows I am using FiveWin Version: FWH 13.12, but that is not the case, I am using 14.04. Not sure why this is reporting erroneously, but it is incorrect.

Application
===========
Path and name: c:\fwh\samples\testdrop.exe (64 bits)
Size: 3,555,840 bytes
Compiler version: Harbour 3.4.0dev () (2014-05-29 08:53)
FiveWin Version: FWH 13.12
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 4 secs
Error occurred at: 05/29/14, 16:24:26
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 1

Stack Calls
===========
Called from: => PAINTTHENAME( 27 )
Called from: => (b)MAIN( 14 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:DROPFILES( 0 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 0 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 0 )
Called from: => MAIN( 14 )
User avatar
rhlawek
 
Posts: 193
Joined: Sun Jul 22, 2012 7:01 pm

Re: Visual Studio 2013 question

Postby Antonio Linares » Thu May 29, 2014 8:49 pm

Robb,

Thanks for pointing Microsoft SxsTrace. I wasn't aware of this utility. I have tried to use it this way:

sxstrace.exe Trace -logfile:MySxSTrace.log
my.exe
sxstrace.exe Parse -logfile:MySxSTrace.log -outfile:MySxSTrace.txt

but MySysTrace.txt is empty.

Could you please explain us how to use it ? many thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question

Postby Antonio Linares » Thu May 29, 2014 9:12 pm

Robb,

We don't get any errors with Testdrop.prg and if I generate an error it reports FWH 14.04

I am emailing you the same libraries that I am using, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question (solved)

Postby Antonio Linares » Sun Jun 01, 2014 7:42 am

Thanks to Robb we have been able to implement the right makefile for Visual Studio 2013 :-)

go.bat
Code: Select all  Expand view
@set oldpath=%path%
@set oldinclude=%include%
@set oldlib=%lib%
@set oldlibpath=%libpath%
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
c:\"Program Files (x86)\Microsoft Visual Studio 12.0"\VC\bin\nmake -ftest.mak
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=
@set oldlibpath=
if errorlevel==0 one.exe
 


test.mak
Code: Select all  Expand view
#Microsoft VS2013 make sample, (c) FiveTech Software 2014

HBDIR=c:\harbour
FWDIR=c:\fwteam
VCDIR="c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"
SDKDIR="c:\Program Files (x86)\Windows Kits\8.1"

.SUFFIXES: .prg .c .obj .rc .res

one.exe : one.obj two.obj three.obj one.res
   echo one.obj two.obj three.obj > msvc.tmp

   echo $(FWDIR)\lib\FiveH64.lib $(FWDIR)\lib\FiveHC64.lib >> msvc.tmp

   echo $(HBDIR)\lib\vc64\hbrtl.lib    >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbvm.lib     >> msvc.tmp
   echo $(HBDIR)\lib\vc64\gtgui.lib    >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hblang.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbmacro.lib  >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbrdd.lib    >> msvc.tmp
   echo $(HBDIR)\lib\vc64\rddntx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\rddcdx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\rddfpt.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbsix.lib    >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbdebug.lib  >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbcommon.lib >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbpp.lib     >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbwin.lib    >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbcplr.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\xhb.lib      >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbpcre.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbct.lib     >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbcpage.lib  >> msvc.tmp
   echo $(HBDIR)\lib\vc64\hbzlib.lib   >> msvc.tmp
   echo $(HBDIR)\lib\vc64\png.lib      >> msvc.tmp

   echo kernel32.lib  >> msvc.tmp
   echo user32.lib    >> msvc.tmp
   echo gdi32.lib     >> msvc.tmp
   echo winspool.lib  >> msvc.tmp
   echo comctl32.lib  >> msvc.tmp
   echo comdlg32.lib  >> msvc.tmp
   echo advapi32.lib  >> msvc.tmp
   echo shell32.lib   >> msvc.tmp
   echo ole32.lib     >> msvc.tmp
   echo oleaut32.lib  >> msvc.tmp
   echo uuid.lib      >> msvc.tmp
   echo odbc32.lib    >> msvc.tmp
   echo odbccp32.lib  >> msvc.tmp
   echo iphlpapi.lib  >> msvc.tmp
   echo mpr.lib       >> msvc.tmp
   echo version.lib   >> msvc.tmp
   echo wsock32.lib   >> msvc.tmp
   echo msimg32.lib   >> msvc.tmp
   echo oledlg.lib    >> msvc.tmp
   echo psapi.lib     >> msvc.tmp
   echo gdiplus.lib   >> msvc.tmp
   echo winmm.lib     >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

   link @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:libc > link.log
   @type link.log
   @del one.c
   @del two.c
   @del three.c
   @del msvc.tmp

one.obj   : one.c
two.obj   : two.c
three.obj : three.c

one.c   : one.prg
two.c   : two.prg
three.c : three.prg

one.res : one.rc
   c:\vc98\bin\rc.exe -r -d__FLAT__ one.rc

.prg.c:
   $(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include

.c.obj:
   cl.exe -c -TC -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $<
 


uno.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   Two()
   
   Three()

return nil
 


two.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Two()

   local oWnd

   DEFINE WINDOW oWnd TITLE "FWH64 and Harbour 64 bits for Microsoft Visual Studio 2013"

   ACTIVATE WINDOW oWnd

return nil


three.prg
Code: Select all  Expand view
function Three()

   MsgInfo( "three.prg also linked" )

return nil


one.rc
Code: Select all  Expand view
// place your resources here

1 ICON favorite.ico


You can download it from here:
https://bitbucket.org/fivetech/fivewin-contributions/downloads/vs2013_make.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question (solved)

Postby Antonio Linares » Sun Jun 01, 2014 2:26 pm

Robb,

Regarding the drag & drop problem, it seems as Vista/Windows 7 64 bits have blocked it (just for 64 bits apps, no idea why it is allowed on 32 bits apps):

http://helgeklein.com/blog/2010/03/how-to-enable-drag-and-drop-for-an-elevated-mfc-application-on-vistawindows-7/

So, following that post I have modified FWH DragAcceptFiles() this way:
Code: Select all  Expand view
HB_FUNC( DRAGACCEPTFILES ) // ( hWnd, lOnOff )  --> nil
{
   #ifndef _WIN64
      DragAcceptFiles( ( HWND ) hb_parnl( 1 ), hb_parl( 2 ) );
   #else  
      DragAcceptFiles( ( HWND ) hb_parnll( 1 ), hb_parl( 2 ) );

      ChangeWindowMessageFilter( ( HWND ) hb_parnll( 1 ),
                                   WM_DROPFILES, MSGFLT_ALLOW );
      ChangeWindowMessageFilter( ( HWND ) hb_parnll( 1 ),
                                   WM_COPYDATA, MSGFLT_ALLOW );
      ChangeWindowMessageFilter( ( HWND ) hb_parnll( 1 ),
                                 0x0049, MSGFLT_ALLOW );
   #endif
}


but it is not working on Windows 8 64 bits. I am going to google now for a solution for Windows 8 64.

Please notice that there were two places in dropfile.c where hb_parnll() was required. Even with this change, keeps failing on 64 bits, possible for the above explained limitation.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question (solved)

Postby Antonio Linares » Sun Jun 01, 2014 2:39 pm

http://helgeklein.com/blog/2010/03/how-to-enable-drag-and-drop-for-an-elevated-mfc-application-on-vistawindows-7/

This does not (yet) work for Windows 8. Does anyone have a solution for this ?


http://stackoverflow.com/questions/8239271/uac-elevation-does-not-allow-drag-and-drop

The solution as provided by Helge Klein did work excellent for Windows 7. However, it does not work for Windows 8 (helgeklein.com/blog/2010/03/…). Anyone has got a suggestion how to deal with this new issue? – user1988169 Jan 17 '13 at 18:41
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question (solved)

Postby Antonio Linares » Sun Jun 01, 2014 2:43 pm

It seems that is possible to bypass that drag & drop limitation on Windows 8 but it requires some Windows settings:

http://www.c-sharpcorner.com/UploadFile/nipuntomar/drag-drop-not-working-in-windows-8/
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question (solved)

Postby Antonio Linares » Sun Jun 01, 2014 2:47 pm

Robb,

Are you working on administrator mode ? Drag & drop does not work on administrator mode on Windows 8 64 bits.

But it works fine for regular users :-)

Problem solved :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Visual Studio 2013 question (solved)

Postby Enrico Maria Giordano » Mon Jun 02, 2014 10:47 am

Antonio,

can you compile the very same sample PRG using BCC 581 and VS2013 and send me the two EXEs to test them here?

Thank you in advance.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Visual Studio 2013 question (solved)

Postby Antonio Linares » Mon Jun 02, 2014 2:03 pm

Enrico,

Already sent to your email, but I built both in 32 bits.

Please let me know if you want 64 bits versions too :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests