473,409 Members | 1,967 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,409 software developers and data experts.

SHBrowseForFolder (shell32 API) raising exception in 64 bit OS (Windows 7)

Hi,

I had developed an application in VS 2008(VB) which uses ‘SHBrowseForFolder’ method of shell32.dll for browsing of files as well as folders. i.e. I can get path of folder only or path of file only as per requirement. I used it as following.

Private Declare Function SHBrowseForFolder Lib "shell32" (ByRef lpbi As BrowseInfo) As Integer

Every thing works fine when I run my application in 32 bit OS (i.e. Win XP) and also in 64 bit OS (Window 7 x64) after compiling it using ‘Target CPU’ option to ‘X86’, but when I compile it after setting ‘Target CPU’ option to ‘Any CPU’, the ‘SHBrowseForFolder’ function throws following exception in 64 bit OS (i.e. Windows 7 x64) i.e.

“Attempted to read or write protected memory. This is often an indication that other memory is corrupt”

I get Browse methods and able to Browse File or Folder individually but fails to Browse them simultanously.

How I can use same API for 64 bit OS? And if it is not possible then what can be its alternate?


Thanks in advance.
Mar 10 '11 #1
0 1346

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Ali Akbar | last post by:
Hi everyone, I just wanted to know how my program can trap a particular API call by windows. (The idea is that I want to hook all the open text boxes and keep hooking new ones as and when they...
1
by: Rajesh.V | last post by:
I have made a custom control in asp.net using webcontrols, and am raising my event. I find that if no control is hooked into the event it goes for a toss. I tried to find length of the delegate...
1
by: Christoph Engelhardt | last post by:
Hi newsgroup, What I intend to do: Write a small programm, that will add a new Button to every Window right beside the Buttons for minimizing, maximizing and closing the window in the window's...
5
by: musikit | last post by:
hello, i'm trying to build a software product that will auto setup/configure a VPN connection on windows. does anyone know if MS provides an activex component or a API or SDK for this?
6
by: Michael Goerz | last post by:
Hi, I would like to raise an exception any time a subprocess tries to read from STDIN: latexprocess = subprocess.Popen( \ 'pdflatex' + " " \ + 'test' + " 2>&1", \ shell=True, \...
1
by: maxsteel | last post by:
Hi all! I have to use an API which is in VC++ in my C# windows application. Can you please help me out. I am struck up with Blankmind.....
0
by: Lawrence Bevan | last post by:
I want to host a windows explorer instance in a simple window. I found some code that does just that but I'm a novice at coding vb as it is and have no idea at all about C. This is what I want...
0
by: Eran.Yasso | last post by:
Hi all, The following code sets/disables network adpter's status. Since I have no idea where to put this code and I wish to share the community with it. I did rverse engineering from VBS to C#....
0
by: Developer111 | last post by:
I had developed an application in VS 2008, which uses MSCOMCTL.OCX. Every thing works fine as long as I run my application in 32 bit OS (i.e. Win XP) and also in 64 bit OS (Window 7 x64) after...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.