Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
languagecpp
themeEclipse
linenumberstrue
collapsefalse
#define COMMAND1		1
#define COMMAND2		2

#define RETURN_COMMAND1	100
#define RETURN_COMMAND2	200

extern "C" __declspec(dllexport) voidint ExecInClientDLL(int idCommand, char * buffParam, char * buffOutput, int buffLen)
{
	switch (idCommand)
	{
	case COMMAND1:
		{
			strcpy(buffOutput, "Comando 1");
			return RETURN_COMMAND1;
		}
	case COMMAND2:
		{
			strcpy(buffOutput, "Comando 2");
			return RETURN_COMMAND2;
		}
			
	default:
		strcpy(buffOutput, "Comando inválido");
		return 0;
	}
}

...