up...
Type: Posts; User: ZeroMemory
up...
Let's say that I have two threads running on two different nodes. Suppose that each thread frequently call the same function foo().
void ThreadFunc1()
{
//do stuff
foo();
//do...
ok...thanks abachler!
so do you know if it's better to use dllimport/dllexport or to use a structure for globals and then pass its pointer?
ok...let's explain in depth my (superior :)) coding style. I use VisualC++. I'm coding in a C-style C++...er...procedural programming...but I embed functions and data logically correlated in...
well...that's ok...I'm could use structs then...
anyway I've found that VisualC++ supports the __declspec(dllimport) identifier. Could it be used for my purpose?
I'm coding in C. I could make all my global variables inside a big structure (and that's not good for readibility) ...but they are declared in more than one source file. It would get really...
ok...but do I really have to make a copy of ALL the variables on every DLL project? There are not other ways?
For my project I often use DLLs to write modules so I can load only the needed ones at runtime. The problem is that have to use functions and variables that are inside the exe project from the DLL...
for King Mir: I don't use the union as the return type of my functions. Every function has its own return type. Then to call functions I use the union to store their return value, be it an int, a...
Ok...Thanks a lot!
I know that...in fact is what I want. In my coding style I always do
ret = func1();
if (FAILED(ret))
{
//handle error
}
ret = func2();
The first thing I do after having called a function is to check its return value. So I don't bother if the next function overwrites it.
I know wich filed to use for every function because I know...
or use BASS http://www.un4seen.com/ or FMOD http://www.fmod.org/ They are more audio oriented and fmod has built in DSP effects.
to save typing and increase readability
The Windows API functions can have different return types (DWORD, HRESULT, BOOL ecc.). In my functions I have to call several Windows API functions, so I declare a variable for each return type. For...
but the type of a pointer is only an indication to the compiler on how to handle its arithmetic, isn't it? So why should it not work?
:) thanks...
So it's impossible...well...anyway I'm embedding my modules in DLL files. What if, in the host app, I declare
typedef int (WINAPI* LPFUNC_INIT)(void*);
then in the DLL...
Do you need sounds that are in synch (for example for playng musical parts one on top of the others) or do you simply need to play various sound when you want? (consider for example sounds in a...
laserlight...thanks for your answer...but I don't understand what you're sayng...could you explain it a bit better?
I know that a pointer is just 4bytes (or 8bytes)...but I don't like the idea to have to copy the variable only to use it as a different type...really there aren't other ways? Also why the line
...
hello...I'm designing an interface that each module of my app should follow. It has a funcion for initialization, one for finalization ecc. Their prototypes are like that:
int Init(void* ptr);...
For sound generation/effects you should read some book on DSP...It's really exciting having your own sound engine based on synthesis...you have full control on the sound. It can be dinamically...
The DirectX SDK says that DirectInput is deprecated and that Raw Input should be used instead (Raw Input is in the Windows SDK). From Windows 2000 to Vista DirectInput does nothing else than wrapping...
WCHAR lpszOutput[] = L"c:\\PDFTron_before.pdf";
SHELLEXECUTEINFOW File;
File.cbSize = sizeof(SHELLEXECUTEINFOW);
File.hwnd = NULL;
File.lpVerb = L"open";
File.lpFile = lpszOutput;
...
Everytime you create an object (g_pDirect3D, g_pDirect3D_Device) you have to check if it has been created or if an error has occured.
add this
g_pDirect3D = Direct3DCreate9(D3D_SDK_VERSION);...