so i am trying to mix pointers and winapi i have some confusion
#include <windows.h>
#include <tchar.h>
#include <urlmon.h>
#pragma comment(lib, "UrlMon.lib")
struct Data
{
HRESULT hr;
STARTUPINFO si;
PROCESS_INFORMATION pi;
};
int main()
{
Data *pData = new Data();
const TCHAR url[] = _T("http://192.168.1.37:8000/putty.exe");
const TCHAR path[] = _T("C:\\Intel\\Logs\\putty.exe");
pData->hr = URLDownloadToFile(0, url, path, 0, 0);
// now here comes the confusion part //
ZeroMemory(pData->&si, sizeof(pData->si));
// that line is wrong , works good without using arrow pointer but i am trying to use it anyways compiler says error , expected a member name
ZeroMemory(&si, sizeof(si));
// this is correct way, but again, how to use zeromemory with structs ?