473,385 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

shfolder.dll - File Not Found

I installed VB6 onto a Vista system to check some legacy code. When I run my
project, the code where shell folders are determined, I get the following
error when using the API:SHGetFolderPath

Error #48: File Not Found

I checked and shfolder is definitely in the sytem32 folder. But of course,
the legacy code is expecting the pre-Vista version of shfolder.dll. Has
there been so much change in this file that it would return a file not found
message. Anybody have any background info on this issue they can share?

Much appreciated!!

JR

Nov 1 '08 #1
9 3109

"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.com ...
I installed VB6 onto a Vista system to check some legacy code. When I run
my
project, the code where shell folders are determined, I get the following
error when using the API:SHGetFolderPath

Error #48: File Not Found

I checked and shfolder is definitely in the sytem32 folder. But of course,
the legacy code is expecting the pre-Vista version of shfolder.dll. Has
there been so much change in this file that it would return a file not
found
message. Anybody have any background info on this issue they can share?
Not enough information.

The 'file' hasn't changed but due to UAC, compatiblity, and to some degree
64-bit/wow issues, permissions and 'views' have certainly changed. ie, what
may 'exist' in some situations, may not 'exist' in another.

You might check out the new group -
"microsoft.public.vb.vista.compatibility".

-ralph
Nov 1 '08 #2
In addition to Ralph reply, try to run it with the administrative
privileges.
Jack

"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.com ...
>I installed VB6 onto a Vista system to check some legacy code. When I run
my project, the code where shell folders are determined, I get the
following error when using the API:SHGetFolderPath

Error #48: File Not Found

I checked and shfolder is definitely in the sytem32 folder. But of course,
the legacy code is expecting the pre-Vista version of shfolder.dll. Has
there been so much change in this file that it would return a file not
found message. Anybody have any background info on this issue they can
share?

Much appreciated!!

JR

Nov 1 '08 #3
Well, I certainly should have mentioned that not only am I running the
legacy code within the VB6 environment but the platform is a x64 bit system.
The legacy code was compiled on a 32bit system.

I am running the IDE in "Start as admin" mode.

I'm not convinced the error is the result of the 32-bit versus 64-bit
difference. Am I completely off track here? Any further suggestions?

JW

"Jack" <replyto@itwrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
In addition to Ralph reply, try to run it with the administrative
privileges.
Jack

"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.com ...
>>I installed VB6 onto a Vista system to check some legacy code. When I run
my project, the code where shell folders are determined, I get the
following error when using the API:SHGetFolderPath

Error #48: File Not Found

I checked and shfolder is definitely in the sytem32 folder. But of
course, the legacy code is expecting the pre-Vista version of
shfolder.dll. Has there been so much change in this file that it would
return a file not found message. Anybody have any background info on this
issue they can share?

Much appreciated!!

JR

Nov 1 '08 #4
Have you looked at
http://msdn.microsoft.com/en-us/libr...81(VS.85).aspx, and understand
what it says about the version on Vista?

Also, it seems you think the error is indicating it cannot find the dll
itself. It seems to me the message means that it cannot find whatever the
folder id you are passing into the function.
"Jerry West" <jw@comcast.netwrote in message
news:0L******************************@giganews.com ...
Well, I certainly should have mentioned that not only am I running the
legacy code within the VB6 environment but the platform is a x64 bit
system. The legacy code was compiled on a 32bit system.

I am running the IDE in "Start as admin" mode.

I'm not convinced the error is the result of the 32-bit versus 64-bit
difference. Am I completely off track here? Any further suggestions?

JW

"Jack" <replyto@itwrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
>In addition to Ralph reply, try to run it with the administrative
privileges.
Jack

"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.co m...
>>>I installed VB6 onto a Vista system to check some legacy code. When I run
my project, the code where shell folders are determined, I get the
following error when using the API:SHGetFolderPath

Error #48: File Not Found

I checked and shfolder is definitely in the sytem32 folder. But of
course, the legacy code is expecting the pre-Vista version of
shfolder.dll. Has there been so much change in this file that it would
return a file not found message. Anybody have any background info on
this issue they can share?

Much appreciated!!

JR

Nov 1 '08 #5
Jerry West <jw@comcast.netschrieb im Beitrag
<Fv******************************@giganews.com>. ..
I installed VB6 onto a Vista system to check some legacy code. When I run
my
project, the code where shell folders are determined, I get the following
error when using the API:SHGetFolderPath
The shfolder.dll has been designed primarily for Windows 9x and NT <= 4
with IE <= 4. You shouldn't use this on newer versions of Windows. Use the
following shell procedures instead:
SHGetSpecialFolderLocation()
SHGetSpecialFolderPath()

--
----------------------------------------------------------------------
Thorsten Albers albers(a)uni-freiburg.de
----------------------------------------------------------------------

Nov 1 '08 #6
"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.com ...
Error #48: File Not Found
VB6 throws that error when there is something wrong with the declaration or
the way the function was called, and doesn't necessarily mean that the file
was not found.

Please post the function declaration and how it's called.
Nov 1 '08 #7
It seems what I am doing should be supported based on the MSDN article
indicated by a previous post on this thread. The call I make looks like
this:

'Declare Function SHGetFolderPath Lib "shfolder.dll" Alias
"SHGetFolderPathA" (ByVal hwndOwner As Long, 'ByVal nFolder As Long, ByVal
hToken As Long, ByVal dwReserved As Long, ByVal lpszPath As String) As 'Long

' sFolderPath$ = Space(MAX_PATH)
' alFolders&(iIdx%) = 48
' SHGFP_TYPE_CURRENT = 0

lRet& = SHGetFolderPath(frmMain.hWnd, alFolders&(iIdx%), 0&,
SHGFP_TYPE_CURRENT, sFolderPath$)

Like I said, works fine pre-Vista.

JW

"expvb" <no****@cox.netwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.com ...
>Error #48: File Not Found

VB6 throws that error when there is something wrong with the declaration
or the way the function was called, and doesn't necessarily mean that the
file was not found.

Please post the function declaration and how it's called.

Nov 1 '08 #8
I don't have vb 6, but the code runs on vist from .net 2008. With a
non-admin user, I get a path that is not a valid path.
The folder returned does exist for an admin user.

"Jerry West" <jw@comcast.netwrote in message
news:AN******************************@giganews.com ...
It seems what I am doing should be supported based on the MSDN article
indicated by a previous post on this thread. The call I make looks like
this:

'Declare Function SHGetFolderPath Lib "shfolder.dll" Alias
"SHGetFolderPathA" (ByVal hwndOwner As Long, 'ByVal nFolder As Long, ByVal
hToken As Long, ByVal dwReserved As Long, ByVal lpszPath As String) As
'Long

' sFolderPath$ = Space(MAX_PATH)
' alFolders&(iIdx%) = 48
' SHGFP_TYPE_CURRENT = 0

lRet& = SHGetFolderPath(frmMain.hWnd, alFolders&(iIdx%), 0&,
SHGFP_TYPE_CURRENT, sFolderPath$)

Like I said, works fine pre-Vista.

JW

"expvb" <no****@cox.netwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>"Jerry West" <jw@comcast.netwrote in message
news:Fv******************************@giganews.co m...
>>Error #48: File Not Found

VB6 throws that error when there is something wrong with the declaration
or the way the function was called, and doesn't necessarily mean that the
file was not found.

Please post the function declaration and how it's called.

Nov 1 '08 #9
Jerry West <jw@comcast.netschrieb im Beitrag
<AN******************************@giganews.com>. ..
lRet& = SHGetFolderPath(frmMain.hWnd, alFolders&(iIdx%), 0&,
SHGFP_TYPE_CURRENT, sFolderPath$)

Like I said, works fine pre-Vista.
Presumably the reason for this is what the documentation on
SHGetFolderPath() in the MSDN states on the parameter 'nFolder': "Only real
folders are valid. If a virtual folder is specified, this function will
fail". Under certain conditions on Windows Vista your application somehow
works with virtual folder pathes, not with real ones (keyword is 'virtual
store').

--
----------------------------------------------------------------------
Thorsten Albers albers(a)uni-freiburg.de
----------------------------------------------------------------------

Nov 2 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard | last post by:
Hi, Can anyone tell me what the difference is between for line in file.readlines( ): and for line in file:
3
by: Abhas | last post by:
> > Hi, this is Abhas, > > I had made a video library program in C++, but was facing a problem. > > After entering 12 movies, i cannot enter any more movies. > > Something gibberish comes instead....
7
by: spike | last post by:
Im writing a program to search for a string in a binary file. And it works. The problem is: It is sooo slow! how can i make it faster? It takes 27 seconds just to search a 5 meg file. I guess it...
2
by: Profetas | last post by:
I have the following code that detects a <c> and </c> #include <stdio.h> main(int argc, char *argv) { FILE* fp; char data;
3
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a...
1
by: Christian Rühl | last post by:
hey! what i wanna do sounds very simple at first, but it turned out to be a real bone crusher... i want to check if a treeView node is checked and if a correspondent node in my xml config file...
1
by: Christian Rühl | last post by:
hey! what i wanna do sounds very simple at first, but it turned out to be a real bone crusher... i want to check if a treeView node is checked and if a correspondent node in my xml config file...
24
by: Bill | last post by:
Hello, I'm trying to output buffer content to a file. I either get an access violation error, or crazy looking output in the file depending on which method I use to write the file. Can anyone...
9
by: Jerry West | last post by:
I installed VB6 onto a Vista system to check some legacy code. When I run my project, the code where shell folders are determined, I get the following error when using the API:SHGetFolderPath ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.