Recent

Author Topic: Trying to get My Documents folder  (Read 12712 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 9284
Re: Trying to get My Documents folder
« Reply #45 on: July 19, 2017, 01:43:35 pm »
Anyway, the user name has Unicode characters outside the 7-bit ASCII range.
Still a mystery...
That's not a mystery, but fully allowed.
also related to equus asinus.

rvk

  • Hero Member
  • *****
  • Posts: 3842
Re: Trying to get My Documents folder
« Reply #46 on: July 19, 2017, 01:46:33 pm »
Anyway, the user name has Unicode characters outside the 7-bit ASCII range.
Still a mystery...
That's not a mystery, but fully allowed.
It's a mystery why the API call fails (in case of OP's computer). And only on extended characters at that.

josh

  • Hero Member
  • *****
  • Posts: 754
Re: Trying to get My Documents folder
« Reply #47 on: July 19, 2017, 02:05:46 pm »
Update:
Just completed install of fresh lazarus trunk, and this exhibits same behavior.
So I have done some further testing, if I set target as i386, then I get same odd behavior ie Path not found when run in IDE.
If I change target to x86-64, re-build application and now the IDE is displaying the correct folder.

video showing behavior in i386 and x86-64, at end of video I call up laza help so you can see the version info.

https://youtu.be/f5jEfNeVyuM

maybe its narrowing down the issue, I hope so.
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

ahiggins

  • Jr. Member
  • **
  • Posts: 92
Re: Trying to get My Documents folder
« Reply #48 on: July 19, 2017, 02:12:27 pm »
Might not be related but I seem to remember having a similar issue running an external application (file not found error), turned out to be that my 32bit application do not like accessing the "Program Files" directory on a 64bit system, recompiled as 64bit, worked fine. There is post on here somewhere that explains it fully. Sorry if I'm completely of the mark.

rvk

  • Hero Member
  • *****
  • Posts: 3842
Re: Trying to get My Documents folder
« Reply #49 on: July 19, 2017, 02:13:25 pm »
So 64 bit application works fine inside the IDE?
(but actually the 64 bit app doesn't run inside the IDE.)

It could also be a GDB.exe issue.
Did you try the 32bit version with Shift+Ctrl+F9 (or Run > Run without debugger) ???


Could you check all places where you have shell32.dll on your computer?

cmd.exe
cd \
dir shell32.dll /s

Code: [Select]
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\UmlautUser-äöüÄ>cd \

C:\>dir shell32.dll /s
 Volume in drive C has no label.
 Volume Serial Number is 9C53-3EF9

 Directory of C:\Windows\System32

11/21/2010  05:23 AM        14,174,208 shell32.dll
               1 File(s)     14,174,208 bytes

 Directory of C:\Windows\SysWOW64

11/21/2010  05:24 AM        12,872,192 shell32.dll
               1 File(s)     12,872,192 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.17514_none_ca4f304d289b7800

11/21/2010  05:23 AM        14,174,208 shell32.dll
               1 File(s)     14,174,208 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.17514_none_d4a3da9f5cfc39fb

11/21/2010  05:24 AM        12,872,192 shell32.dll
               1 File(s)     12,872,192 bytes

     Total Files Listed:
               4 File(s)     54,092,800 bytes
               0 Dir(s)   6,162,755,584 bytes free

C:\>
« Last Edit: July 19, 2017, 02:15:22 pm by rvk »

josh

  • Hero Member
  • *****
  • Posts: 754
Re: Trying to get My Documents folder
« Reply #50 on: July 19, 2017, 02:43:01 pm »
location of shell32.dll
Code: [Select]
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\joáh>cd\

C:\>dir shell32.dll /s
 Volume in drive C has no label.
 Volume Serial Number is 40EB-6EBC

 Directory of C:\Windows\System32

20/06/2017  13:57        14,183,936 shell32.dll
               1 File(s)     14,183,936 bytes

 Directory of C:\Windows\SysWOW64

20/06/2017  13:57        12,880,896 shell32.dll
               1 File(s)     12,880,896 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.17514_none_ca4f304d289b7800

21/11/2010  04:23        14,174,208 shell32.dll
               1 File(s)     14,174,208 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.18222_none_ca42435328a5836f

26/07/2013  03:24        14,172,672 shell32.dll
               1 File(s)     14,172,672 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.18952_none_ca21e0d928bdc353

02/11/2015  02:00        14,176,768 shell32.dll
               1 File(s)     14,176,768 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.22403_none_cae2822641b201d5

26/07/2013  03:24        14,176,256 shell32.dll
               1 File(s)     14,176,256 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.23155_none_caae56a441d8e264

02/11/2015  02:00        14,182,912 shell32.dll
               1 File(s)     14,182,912 bytes

 Directory of C:\Windows\winsxs\amd64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.23806_none_cae573d441af5c17

20/06/2017  13:57        14,183,936 shell32.dll
               1 File(s)     14,183,936 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.17514_none_d4a3da9f5cfc39fb

21/11/2010  04:24        12,872,192 shell32.dll
               1 File(s)     12,872,192 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.18222_none_d496eda55d06456a

26/07/2013  02:55        12,872,704 shell32.dll
               1 File(s)     12,872,704 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.18952_none_d4768b2b5d1e854e

02/11/2015  02:00        12,875,776 shell32.dll
               1 File(s)     12,875,776 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.22403_none_d5372c787612c3d0

26/07/2013  02:56        12,874,752 shell32.dll
               1 File(s)     12,874,752 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.23155_none_d50300f67639a45f

02/11/2015  02:00        12,878,848 shell32.dll
               1 File(s)     12,878,848 bytes

 Directory of C:\Windows\winsxs\wow64_microsoft-windows-shell32_31bf3856ad364e35
_6.1.7601.23806_none_d53a1e2676101e12

20/06/2017  13:57        12,880,896 shell32.dll
               1 File(s)     12,880,896 bytes

     Total Files Listed:
              14 File(s)    189,386,752 bytes
               0 Dir(s)  28,598,775,808 bytes free

C:\>

If I run without debugger it works correctly, if I create debug and release mode then neither of these work correctly,
So it looks like maybe gdb is messing with something.

Code: [Select]
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

rvk

  • Hero Member
  • *****
  • Posts: 3842
Re: Trying to get My Documents folder
« Reply #51 on: July 19, 2017, 02:56:39 pm »
Strange because I also use GDB 7.2 with my standard install of trunk.
I do download GDB 7.7.1 in my script but don't actively use it.

Here is 7.7.1
http://svn.freepascal.org/svn/lazarus/binaries/i386-win32/gdb/bin/
and here is 7.2.1
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/GDB%207.2.1/
(but I think the 7.2.1 is the same one I use with trunk because it's the one from the binutils)

You could try one of these.