Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 13944139

@User 13944139
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • meaing of below code
    U User 13944139

    please tell me what is going on in below code

    if(curl)
    {
    curl_easy_setopt(curl,CURLOPT_URL,url.c_str());
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl,CURLOPT_WRITEDATA,&ret);
    curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,WriteFunction);
    CURLcode res = curl_easy_perform(curl);
    if(res != CURLE_OK)
    {
    curl_easy_cleanup(curl);
    return 0;
    }
    curl_easy_cleanup(curl);
    if(ret.find("Ok"))
    {
    char* r=new char[ret.length()+1];
    strcpy(r,ret.c_str());
    char* p=strtok(r,"|");
    p=strtok(NULL,"|");
    return atoi(p);
    }
    }
    return 1;
    }

    Managed C++/CLI question

  • c++ sms send dll
    U User 13944139

    i have a code for sms send my api provider is changed below mention is my code problem is what will return my new api vender so i can use that dll in my vfp application. code

    // smsservice.cpp : Defines the exported functions for the DLL application.
    //

    #include "stdafx.h"
    #include "smsservice.h"
    #include using namespace std;
    size_t WriteFunction( char *ptr, size_t size, size_t nmemb, void *userdata)
    {
    string* s=(string*)userdata;
    int i;
    for(i=0;ipush_back(ptr[i]);
    }
    return i;
    }
    int _declspec(dllexport) SendSms(LPCSTR userId,LPCSTR userPass,LPCSTR phoneNumber,LPCSTR smsText,LPCSTR senderId)
    {
    CURL* curl;
    curl=curl_easy_init();
    string ret;
    string url="http://way2send.in/submitsms.jsp?Userid=";

    char\* esc=curl\_easy\_escape(curl,userId,strlen(userId));
    url+=esc;
    curl\_free(esc);
    
    url+="&UserPassword=";
    esc=curl\_easy\_escape(curl,userPass,strlen(userPass));
    url+=esc;
    curl\_free(esc);
    
    url+="&PhoneNumber=";
    esc=curl\_easy\_escape(curl,phoneNumber,strlen(phoneNumber));
    url+=esc;
    curl\_free(esc);
    
    url+="&Text=";
    esc=curl\_easy\_escape(curl,smsText,strlen(smsText));
    url+=esc;
    curl\_free(esc);
    
    url+="&GSM=";
    esc=curl\_easy\_escape(curl,senderId,strlen(senderId));
    url+=esc;
    curl\_free(esc);
    
    if(curl)
    {
    	curl\_easy\_setopt(curl,CURLOPT\_URL,url.c\_str());
    	curl\_easy\_setopt(curl, CURLOPT\_FOLLOWLOCATION, 1L);
    	curl\_easy\_setopt(curl,CURLOPT\_WRITEDATA,&ret);
    	curl\_easy\_setopt(curl,CURLOPT\_WRITEFUNCTION,WriteFunction);
    	CURLcode res = curl\_easy\_perform(curl);
    	if(res != CURLE\_OK)
    	{	
    		curl\_easy\_cleanup(curl);
    		return 0;
    	}
    	curl\_easy\_cleanup(curl);
    	if(ret.find("Ok"))
    	{
    		char\* r=new char\[ret.length()+1\];
    		strcpy(r,ret.c\_str());
    		char\* p=strtok(r,"|");
    		p=strtok(NULL,"|");
    		return atoi(p);
    	}
    }
    return 1;
    

    }

    Managed C++/CLI c++ java json help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups