Let me assume the following:
LPDIRECTDRAW7 pDD; // Should be initialized first
LPDIRECTDRAWSURFACE7 pSurf; // Should be initialized first
PBYTE pSurfPtr;
DDSURFACEDESC2 ddsd;
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
pSurf->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL);
pSurfPtr = (PBYTE) ddsd.lpSurface;
pSurfPtr[x + y * ddsd.lPitch] = Color;
pSurf->Unlock(NULL);
That's it.
VirtualNext