#oh ok so basically im trying to get an

1 messages · Page 1 of 1 (latest)

cerulean venture
#

Why don't you just pass the underlying type? I.e. unsigned int?

hardy meteor
#

i haven't tried that, usually it wants it to be name specific or it gets upset, but that was for structs, not typedefs, so i suppose it might work, ill try that and report back, thanks!

cerulean venture
#

Please do report back. I'm curious about how that works too.

#

In case you're not aware, "int" and "unsigned int" are not standard sizes across languages (and not even within c++).

hardy meteor
#

huh that is fascinating, thanks

hardy meteor
#

keeps on giving me this error, which i cant seem to find any solutions to online

coarse geyser
#

Probably means that there's no corresponding method in the dll.

hardy meteor
#

although should there be any easy way of checking the methods a dll contains, i would happilly check

coarse geyser
#

Well, if you need further help, you'll have to share your code(at least where the error points) and the code of the demo app you're referring to. Or the source code of the dll.

hardy meteor
coarse geyser
#

might want to specify the relevant file code line too.

#

As well as share your own code

hardy meteor
#

ok sure

coarse geyser
#

The whole repository is in c/c++, so I'm not sure how you can use it as a reference for accessing methods in c#

hardy meteor
#

my code: ```csharp
[DllImport("NvFlowLibRelease_win64")]
extern static unsafe AppGraphCtx* AppGraphCtxCreate(int deviceID);

void Start()
{
NVIDIA.Initialize();
Debug.Log(NVIDIA.ChipsetInfo.DeviceId);
unsafe
{
my_app_graph = AppGraphCtxCreate(NVIDIA.ChipsetInfo.DeviceId);
}
}

#

the errors out on the my app graph line

#

any ideas?

coarse geyser
#

I can't see any "AppGraphCtxCreate" method being called in the file that you linked

hardy meteor
#

it isnt being called sure

#

but it still is being existed there

coarse geyser
#

How do you know that?

hardy meteor
#

because of line 34

#

i think?

coarse geyser
#

where did you find that exact name "AppGraphCtxCreate"?

hardy meteor
#

line 34

coarse geyser
#

Don't see it there

NV_FLOW_API NvFlowContext* NvFlowInteropCreateContext(AppGraphCtx* appctx);
hardy meteor
#

oh whoops wrong one then

#

brb while i recheck where on earth it was

#

any ideas?

coarse geyser
#

Hmm

hardy meteor
#

i could always try older versions of nvidia flow incase the newest version for somereason doesn't have the functions?

coarse geyser
#

Not sure if that's the issue

hardy meteor
hardy meteor
#

weird

coarse geyser
#

Also...

hardy meteor
#

checked arround there, couldn't get anything there working

#

althoug the dumpbin was interesting, as it showed no decorated function names

#

weird

#

just regular

#

ill send it here brb

coarse geyser
#

Maybe it's the AppGraphCtx definition...🤔

#

What if you just use int for the return type?

hardy meteor
#

i am also in the process of making noodles, so if my replies are late i apologise

hardy meteor
coarse geyser
#

Welp no clue then. Honestly I don't have that much experience with using C dlls in C#

hardy meteor
coarse geyser
hardy meteor
coarse geyser
#

Donno. This "C" might indicate that the library is in C. Not 100% sure though
#define NV_FLOW_API extern "C" __declspec(dllexport)

coarse geyser
#

Maybe that's from a different library?

hardy meteor
hardy meteor
#

as i dont think i can really go without this function, as almost all nvidia flow functions require nvidia flow context, to create context you need app graph ctx

#

weird, i do wonder how the many app's that use nv flow managed to create context then...

#

perhaps i could find the code they use to interface with nv flow?

coarse geyser
#

Do you have any example of apps written in C#? It seems to be way more compatible with unreal/C++.

coarse geyser
hardy meteor
#

perhaps

#

really wish unity had a better way of interacting with dll's, but i suppose it is more to do with c# than unity

coarse geyser
#

Might as well write your own liquid simulation at this point hahah

hardy meteor
#

lol, so much math though lol, id rather deal with the pain of interop than deal with math and physics lol

#

perhaps i can find some other fluid simulation api that has better documentation, that i can try get working with unity

hardy meteor
hardy meteor