I'm planning to write a DLL in assembly language that is to be called from VBA code. I have googled before posting and that answered some of my questions but not all. (Google was so clever to also find "Assembly" when I said "Assembler" what gave me lots of .NET stuff I was definitely not looking for... )

The main thing I know so far is that VBA always uses the __stdcall calling convention for stuff like that.

What I didn't find is the way that the VBA data types are presented to the called function. I have to pass a string ByVal and a one-dimensional array of Longs ByRef to the single exposed function in the DLL. Will the string arrive as a pointer to a C-style string? And will it be ANSI, MBCS or even something else? Will the array be passed as a pointer to the bare data or is some data structure involved?

I posted this one here instead of the Assembly section because I hope I would find more VBA people here that already have called assembly routines from VBA than assembly people writing stuff to be called from VBA over there. I suppose what I'm trying to do is not really common...

TIA