Click here to Skip to main content
15,914,070 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: VC#.Net class in VC++.Net ? Pin
Andy Rama17-Jul-08 3:34
Andy Rama17-Jul-08 3:34 
AnswerRe: VC#.Net class in VC++.Net ? Pin
Paul Conrad16-Jul-08 9:36
professionalPaul Conrad16-Jul-08 9:36 
QuestionBlowFish Pin
Xaria14-Jul-08 16:24
Xaria14-Jul-08 16:24 
AnswerRe: BlowFish Pin
led mike15-Jul-08 4:27
led mike15-Jul-08 4:27 
AnswerRe: BlowFish Pin
Mark Salsbery15-Jul-08 6:27
Mark Salsbery15-Jul-08 6:27 
AnswerRe: BlowFish Pin
Paul Conrad16-Jul-08 9:35
professionalPaul Conrad16-Jul-08 9:35 
GeneralRe: BlowFish Pin
Xaria16-Jul-08 20:46
Xaria16-Jul-08 20:46 
QuestionMarshalAs UnmanagedType::LPStrunc trouble Pin
Thees Ch. Winkler13-Jul-08 2:44
Thees Ch. Winkler13-Jul-08 2:44 
Hello,

I am trying to access the SHGetKnwonFolderPath function on Vista from NET and I get an exception:
My code looks the following:
[DllImport("shell32.dll")]
extern "C" int SHGetKnownFolderPath([MarshalAs(UnmanagedType::LPStruct)] Guid^ rfid, unsigned int dwFlags, IntPtr hToken, IntPtr ppszPath);

ref class KnownFolders
{
public:
  static const Guid^ AddNewPrograms = gcnew Guid( "de61d971-5ebc-4f02-a3a9-6c82895e5c04" );
... snip ...
};


When running the following code the runtime raises an exception that parameter #1 can not be marshaled as there is no layout information available

String^ str;
IntPtr path;

if(Shell32::SHGetKnownFolderPath((Guid^)KnownFolders::AddNewPrograms, 0, IntPtr::Zero, path) == 0)
{
		
	str = System::Runtime::InteropServices::Marshal::PtrToStringAuto(path);
	System::Runtime::InteropServices::Marshal::FreeCoTaskMem(path);
}


Frown | :-( (
AnswerRe: MarshalAs UnmanagedType::LPStrunc trouble Pin
Mark Salsbery13-Jul-08 16:08
Mark Salsbery13-Jul-08 16:08 
GeneralRe: MarshalAs UnmanagedType::LPStrunc trouble Pin
Thees Ch. Winkler14-Jul-08 9:59
Thees Ch. Winkler14-Jul-08 9:59 
GeneralRe: MarshalAs UnmanagedType::LPStrunc trouble Pin
Mark Salsbery14-Jul-08 10:04
Mark Salsbery14-Jul-08 10:04 
QuestionCalling .Net Interface from VC++ Pin
Debasis108-Jul-08 6:11
Debasis108-Jul-08 6:11 
AnswerRe: Calling .Net Interface from VC++ Pin
Mark Salsbery8-Jul-08 6:57
Mark Salsbery8-Jul-08 6:57 
QuestionHow to give message from thread to main application in VC++.net? Pin
AnayKulkarni7-Jul-08 21:27
AnayKulkarni7-Jul-08 21:27 
AnswerRe: How to give message from thread to main application in VC++.net? Pin
killabyte7-Jul-08 22:05
killabyte7-Jul-08 22:05 
AnswerRe: How to give message from thread to main application in VC++.net? Pin
LionAM8-Jul-08 0:22
LionAM8-Jul-08 0:22 
QuestionCan we reduce this function (x<-3 || x >3) further Pin
pallaka7-Jul-08 20:18
pallaka7-Jul-08 20:18 
AnswerRe: Can we reduce this function (x<-3 || x >3) further Pin
LionAM8-Jul-08 0:35
LionAM8-Jul-08 0:35 
GeneralRe: Can we reduce this function (x<-3 || x >3) further Pin
pallaka8-Jul-08 1:32
pallaka8-Jul-08 1:32 
GeneralRe: Can we reduce this function (x<-3 || x >3) further Pin
killabyte8-Jul-08 2:07
killabyte8-Jul-08 2:07 
QuestionWhat is the proper way to add a form to an existing class? Pin
BuckBrown7-Jul-08 5:55
BuckBrown7-Jul-08 5:55 
AnswerRe: What is the proper way to add a form to an existing class? Pin
led mike7-Jul-08 6:16
led mike7-Jul-08 6:16 
GeneralRe: What is the proper way to add a form to an existing class? Pin
BuckBrown7-Jul-08 7:45
BuckBrown7-Jul-08 7:45 
GeneralRe: What is the proper way to add a form to an existing class? Pin
led mike7-Jul-08 9:17
led mike7-Jul-08 9:17 
AnswerRe: What is the proper way to add a form to an existing class? Pin
killabyte7-Jul-08 23:37
killabyte7-Jul-08 23:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.