Is there an example of dll with CUDA exports?

I admit being new to GPU/CUDA programming, but even so developing a trivial “hello world” dll that exports functions that use CUDA, e.g. return a string with the current device identification, seems unreasonably complex, to say the least. Makes one wonder if it is possible at all.

Please notice I am not worried about the actual CUDA functions to get that info. The SDK includes lots of examples that do that. My concern is how one builds A REGULAR DLL that exports some function, say “myCudaHelloWorld()” which function uses the GPU and does whatever useful. I am a bit surprised there are no clear, step by step examples in the SDK. Also most thread advice I read here doesnt work, maybe because the authors assume you have knowledge that a newbie of course does not have.

So, is there any such simple-dll-step-by-step example somewhere?
Anyone from NVidia that reads these forums? <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=’:’(’ />

1.make a dll without CUDA.
2.make a sample application with CUDA.
3.make a dll with CUDA

Oh wow.

  1. trivial, of course.

  2. no big deal, e.g. lots of examples in the SDK.

  3. ok, here it is.

              Ooops, it doesnt work.  :"> 
             Did we do something wrong?  :( 
             What switch/obscure option/configuration  rule/whatever did we overlook? 
             No example to follow? Nope. Fine, what now?  :blink: 

Thanks anyway for your help.

[q]Ooops, it doesnt work[/q]

What are the symtopms? Error messages?

there is a example.
it’s for C#. But i guess you can get some info from the dll example.