Solved: Teste * params = cast(Teste*) lParam; writeln(params.nome); writeln(params.idade); But here, how can send struct? DialogBoxParam(null, MAKEINTRESOURCE(IDD_DIALOG1), null, &DlgMain, cast(int) &test); // Error, need "int" but I am sending Test*