I'am using the SDK kit to create folders and documents, which works fine, even in VB.NET. But i'am not having any luck in setting the environment name.
Normaly when you create a folder it inherit the environment settings from the parent folder, but it doesn't seem to be the issue when i'am creating folders with the SDK kit.
Is there a way to assign an environemt to a folder an a document. The other solution would be creating the information in the SQL database manually doesn't sound appealing :-)
Thank a'lot in advance
I can't help you with the VBA part, but you don't need to use a hook. The LPAADMSPROJITEM is a structure, actually, what you really are accessing is a pointer to a structure, so you need a way to access what is being referenced by that pointer. And unfortunately for you, two of the items in the structure are also pointers, so you will need to deal with that as well.
You could see if you can find some sample code via Google, etc. on how to access pointers to structures from VBA. I suspect that there are plenty of Win32 code snippets that would require this, but I'm assuming that you can do it from VBA.
Another option would be to try your hand at some C/C++. It may not be as "hard" as you think. You could write a "wrapper" function that you could then call from VBA.
I'll give it a try.
morested, you could try copying a template folder that is setup the way you want with aaApi_CopyProject. If I were to call it from C# I would declare it like this:
external static bool aaApi_CopyProject ( int lSourceProjectId,
IntPtr fpCallBack, //set to null (IntPtr.Zero)
IntPtr aaUserParam, //set to null (IntPtr.Zero)
ref int lplCount
I am not sure how this translates to VB.NET but you don't have to marshal any structures.