topic
stringlengths
1
63
text
stringlengths
1
577k
C STRUCTURE
Puedes proporcionar un PRG de ejemplo de como usas RmChart, para que podamos probarlo y ver que le ocurre ? gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C STRUCTURE
Gracias, sigue el ejemplo que funciona con xHarbour [code=fw:1ezsd5io]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"cstruct.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"RMCHART.Ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> DLL_OSAPI 0x20<br /><br />typedef struct <span style="color: #000000;">&#123;</span> CTYPE_DOUBLE nDouble<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> DataStructD12<br /><br /><span style="color: #00C800;">FUNCTION</span> TesteGrafico<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> aDados := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">225.25</span>, <span style="color: #000000;">100.00</span>, <span style="color: #000000;">100.00</span>, <span style="color: #000000;">150.00</span>, <span style="color: #000000;">250.00</span>, <span style="color: #000000;">300.00</span>, <span style="color: #000000;">25.00</span>, <span style="color: #000000;">75.00</span>, <span style="color: #000000;">300.00</span>, <span style="color: #000000;">200.00</span>, <span style="color: #000000;">325.00</span>, <span style="color: #000000;">300.00</span> <span style="color: #000000;">&#125;</span> , <span style="color: #000000;">&#123;</span> <span style="color: #000000;">220.00</span>, <span style="color: #000000;">100.00</span>, <span style="color: #000000;">125.00</span>, <span style="color: #000000;">300.00</span>, <span style="color: #000000;">150.00</span>, <span style="color: #000000;">125.00</span>, <span style="color: #000000;">85.00</span>, <span style="color: #000000;">50.00</span>, <span style="color: #000000;">285.00</span>, <span style="color: #000000;">275.00</span>, <span style="color: #000000;">295.00</span>, <span style="color: #000000;">280.00</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">125.25</span>, <span style="color: #000000;">100.00</span>, <span style="color: #000000;">100.00</span>, <span style="color: #000000;">150.00</span>, <span style="color: #000000;">250.00</span>, <span style="color: #000000;">300.00</span>, <span style="color: #000000;">25.00</span>, <span style="color: #000000;">75.00</span>, <span style="color: #000000;">300.00</span>, <span style="color: #000000;">200.00</span>, <span style="color: #000000;">325.00</span>, <span style="color: #000000;">300.00</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> cLegenda := <span style="color: #ff0000;">"Entradas*Saidas*Mais Um"</span><br /><span style="color: #00C800;">LOCAL</span> cLabels := <span style="color: #ff0000;">"Janeiro*Fevereiro*Março*Abril*Maio*Junho*Julho*Agosto*Setembro*Outubro*Novembro*Dezembro"</span><br /><span style="color: #00C800;">LOCAL</span> cTitulo := <span style="color: #ff0000;">"Grafico de Teste Grafico"</span><br /><span style="color: #00C800;">PRIVATE</span> hDll := DllLoad<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"rmchart.dll"</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgGra1 <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">770</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oClassVar:<span style="color: #000000;">oFntB</span> <span style="color: #0000ff;">COLOR</span> oClassVar:<span style="color: #000000;">nCorDlgT</span>,oClassVar:<span style="color: #000000;">nCorDlgJ</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDlgGra1:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oChart := TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlgGra1, <span style="color: #ff0000;">"RMChart.RMChartX"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgGra1 <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> GeraRmc<span style="color: #000000;">&#40;</span> oDlgGra1, oChart, aDados, cTitulo, cLabels, cLegenda <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; DllUnload<span style="color: #000000;">&#40;</span> hDLL <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> GeraRmc<span style="color: #000000;">&#40;</span> oDlgGra, oChart, aDados, cTitulo, cLabels, cLegenda <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nRetVal := nMax := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> cImagem := <span style="color: #ff0000;">""</span> <span style="color: #B900B9;">//"C:\SIG32new\Bitmaps\Paper.jpg"</span><br /><span style="color: #00C800;">LOCAL</span> cUnidade := <span style="color: #ff0000;">"R$ "</span><br /><span style="color: #00C800;">LOCAL</span> cTextoVert := <span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">LOCAL</span> aDadosGraf:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> oData1 IS DataStructD12<br /><span style="color: #00C800;">LOCAL</span> oData2 IS DataStructD12<br /><span style="color: #00C800;">LOCAL</span> oData3 IS DataStructD12<br /><br /><span style="color: #00C800;">FOR</span> cTrGra1:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aDados <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; nMax := <span style="color: #0000ff;">MAX</span><span style="color: #000000;">&#40;</span> nMax, Amax<span style="color: #000000;">&#40;</span> aDados<span style="color: #000000;">&#91;</span>cTrGra1<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> cTrGra2:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aDados<span style="color: #000000;">&#91;</span>cTrGra1<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> cTrGra1 == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oData1:<span style="color: #000000;">nDouble</span><span style="color: #000000;">&#91;</span>cTrGra2<span style="color: #000000;">&#93;</span> := aDados<span style="color: #000000;">&#91;</span>cTrGra1,cTrGra2<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF cTrGra1 == <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oData2:<span style="color: #000000;">nDouble</span><span style="color: #000000;">&#91;</span>cTrGra2<span style="color: #000000;">&#93;</span> := aDados<span style="color: #000000;">&#91;</span>cTrGra1,cTrGra2<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF cTrGra1 == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oData3:<span style="color: #000000;">nDouble</span><span style="color: #000000;">&#91;</span>cTrGra2<span style="color: #000000;">&#93;</span> := aDados<span style="color: #000000;">&#91;</span>cTrGra1,cTrGra2<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> cTrGra1 == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aDadosGraf, oData1<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF cTrGra1 == <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aDadosGraf, oData2<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF cTrGra1 == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aDadosGraf, oData3<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">NEXT</span><br /><br />nMax := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> INT<span style="color: #000000;">&#40;</span> nMax/<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">10</span> , <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_CREATECHART"</span>, oDlgGra:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">770</span>, <span style="color: #000000;">400</span>, ColorAzure, RMC_CTRLSTYLE3DLIGHT, .F., cImagem, <span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDREGION"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">760</span>, <span style="color: #000000;">400</span>, <span style="color: #ff0000;">"Sig SoftWare"</span>, .F. <span style="color: #000000;">&#41;</span><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDCAPTION"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">1</span>, cTitulo, ColorTransparent, ColorRed, <span style="color: #000000;">9</span>, .T. <span style="color: #000000;">&#41;</span><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDGRID"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">1</span>, ColorLightBlue, .F., <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">685</span>, <span style="color: #000000;">330</span>, RMC_BICOLOR_LABELAXIS <span style="color: #000000;">&#41;</span><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDLABELAXIS"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">1</span>, cLabels, <span style="color: #000000;">1</span>, LEN<span style="color: #000000;">&#40;</span> aDados<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, RMC_LABELAXISBOTTOM, <span style="color: #000000;">8</span>, ColorBlack, RMC_TEXTCENTER, ColorBlack, RMC_LINESTYLENONE, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDDATAAXIS"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">1</span>, RMC_DATAAXISRIGHT, <span style="color: #000000;">0.0</span>, nMax, LEN<span style="color: #000000;">&#40;</span> aDados<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">8</span>, ColorBlack, ColorBlack, RMC_LINESTYLESOLID, <span style="color: #000000;">0</span>, cUnidade, cTextoVert, <span style="color: #ff0000;">""</span>, RMC_TEXTCENTER <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FOR</span> x:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aDadosGraf<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDBARSERIES"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">1</span>, aDadosGraf<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>, <span style="color: #000000;">12</span>, RMC_BARGROUP, RMC_BAR_FLAT_GRADIENT2, .F., <span style="color: #000000;">0</span>, .F., <span style="color: #000000;">1</span>, RMC_VLABEL_NONE, x, RMC_HATCHBRUSH_ONPRINTING <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br /><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_ADDLEGEND"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">1</span>, cLegenda, RMC_LEGEND_BOTTOM, ColorTransparent, RMC_LEGENDNORECT, ColorRed, <span style="color: #000000;">8</span>, .T. <span style="color: #000000;">&#41;</span><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_DRAW"</span>, <span style="color: #000000;">1001</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////////////////////////</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////////////////////////</span><br /><span style="color: #00C800;">FUNCTION</span> ImprimeGrafico<span style="color: #000000;">&#40;</span> oDlgGra <span style="color: #000000;">&#41;</span><br /><br />nRetVal := DllCall<span style="color: #000000;">&#40;</span>hDll,DLL_OSAPI,<span style="color: #ff0000;">"RMC_DRAW2PRINTER"</span>, <span style="color: #000000;">1001</span>, oDlgGra:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, RMC_EMF <span style="color: #000000;">&#41;</span><br />?nRetVal<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">////////////////////////////DADOS DA FUNCAO////////////////////////////////////////////</span><br /><span style="color: #B900B9;">// NOME &nbsp; &nbsp; &nbsp; : aMax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// SINTESE &nbsp; &nbsp;: Retornar o maior valor de um vetor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// PARAMETROS : <1> aVetor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<2> nElemento (para vetores multimensionais) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// RETORNO &nbsp; &nbsp;: xMaior elemento do vetor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////////////////////////</span><br /><span style="color: #00C800;">function</span> aMax<span style="color: #000000;">&#40;</span> aVetor, nElem <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> aNovoVet<br /><span style="color: #00C800;">local</span> xMaxElem<br /><br /><span style="color: #00C800;">DEFAULT</span> nElem:=<span style="color: #000000;">0</span><br /><br />aNovoVet:=aclone<span style="color: #000000;">&#40;</span> aVetor <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">if</span> nElem=<span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aNovoVet:=asort<span style="color: #000000;">&#40;</span> aNovoVet <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; xMaxElem:=aNovoVet<span style="color: #000000;">&#91;</span>len<span style="color: #000000;">&#40;</span>aNovoVet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aNovoVet:=aasort<span style="color: #000000;">&#40;</span> aNovoVet, nElem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; xMaxElem:=aNovoVet<span style="color: #000000;">&#91;</span>nElem, len<span style="color: #000000;">&#40;</span>aNovoVet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> xMaxElem<br /><br /><span style="color: #B900B9;">////////////////////////////DADOS DA FUNCAO////////////////////////////////////////////</span><br /><span style="color: #B900B9;">// NOME &nbsp; &nbsp; &nbsp; : AaSort &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// FINALIDADE : ordenar os elementos de um vetor muldimensional &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</span><br /><span style="color: #B900B9;">// PARAMETROS : <1> aVetor a ser ordenado &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[2] nElemento do vetor a ser ordenado (default=1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[3] cOrdem Crescente ou Decrescente (default='C') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</span><br /><span style="color: #B900B9;">// RETORNO &nbsp; &nbsp;: aVetor ordenado &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</span><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////////////////////////</span><br /><span style="color: #00C800;">function</span> AaSort<span style="color: #000000;">&#40;</span> aVetor, nElem, cOrdem <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> aRetorno, x, y<br /><br /><span style="color: #00C800;">DEFAULT</span> nElem:=<span style="color: #000000;">1</span><br /><span style="color: #00C800;">DEFAULT</span> cOrdem:=<span style="color: #ff0000;">'C'</span><br /><span style="color: #00C800;">if</span> cOrdem=<span style="color: #ff0000;">'C'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aRetorno:= asort<span style="color: #000000;">&#40;</span> aVetor,,, <span style="color: #000000;">&#123;</span> |x, y| x<span style="color: #000000;">&#91;</span>nElem<span style="color: #000000;">&#93;</span> < y<span style="color: #000000;">&#91;</span>nElem<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aRetorno:= asort<span style="color: #000000;">&#40;</span> aVetor,,, <span style="color: #000000;">&#123;</span> |x, y| x<span style="color: #000000;">&#91;</span>nElem<span style="color: #000000;">&#93;</span> > y<span style="color: #000000;">&#91;</span>nElem<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aRetorno<br />&nbsp;</div>[/code:1ezsd5io]
C STRUCTURE
Existe una versión demo de "rmchart.dll" ?
C STRUCTURE
Aqui <!-- m --><a class="postlink" href="http://www.4shared.com/account/home.jsp#dir=n6d-L3b3">http://www.4shared.com/account/home.jsp#dir=n6d-L3b3</a><!-- m -->
C STRUCTURE
Already reported to 4shared and removed accordingly: [quote:uczz5hwc]Hello, Thank you for letting us know. We have deactivated the links to the illegal files. If you know any other illegal use of our service, please let us know. We will do our best to remove the files as soon as possible. We appreciate your desire to make our service better. Thank you. Best regards, Vadim <!-- e --><a href="mailto:support@4shared.com">support@4shared.com</a><!-- e -->[/quote:uczz5hwc]
C STRUCTURE
Lo siento, pero no te proporcionaré más soporte técnico hasta que no elimines los ficheros ilegales que tienes en tu cuenta de 4shared... Sorry, but I will not provide you any further tech support until you remove all the illegal files that you keep on your 4shared account...
C STRUCTURE
<!-- m --><a class="postlink" href="http://www.4shared.com/rar/iktULs11/RmkChart_42.html">http://www.4shared.com/rar/iktULs11/RmkChart_42.html</a><!-- m --> esse é o arquivo
C STRUCTURE
Olá, Voltando ao assunto do rmchart, com base ao exemplo do aferra, a minha duvida é de como exibir todos os dados de todos os 12 meses? Consegui portar o código para o harbour.
C Struct
Hello, I am developing with xHarbour(version dated 17/11/2-11 from xHarbout.com and Fivewin for Harbour. I realise this is an xHarbour issue rather than a Fivewin issue, but I am hoping someone on this forum can help me. I am trying to get DLLCAL() working wit little to no success. My sample code and (what it returns) can be seen below. All numbers are zero and the string is blank. Any suggestions or help would be appreciated. Cheers, Pat Driscoll #include "CStruct.ch" // required for "typedef struct" #include "Wintypes.ch" // required Windows C data types pragma pack(4) // all Windows API structures // are 4 byte aligned // structure declaration taken via // copy&paste from Windows SDK typedef struct _OSVERSIONINFOEX { ; DWORD dwOSVersionInfoSize; // ˆ this ";" must be added DWORD dwMajorVersion; DWORD dwMinorVersion; DWORD dwBuildNumber; DWORD dwPlatformId; TCHAR szCSDVersion[128]; WORD wServicePackMajor; WORD wServicePackMinor; WORD wSuiteMask; BYTE wProductType; BYTE wReserved; } OSVERSIONINFOEX, *POSVERSIONINFOEX, *LPOSVERSIONINFOEX; #define DC_CALL_STD 0x0020 PROCEDURE Main() LOCAL oVerInfo // Create OSVERSIONINFOEX structure object oVerInfo := (struct OSVERSIONINFOEX) // assign structure size to structure member oVerInfo:dwOSVersionInfoSize := oVerInfo:sizeOf() // pass structure object by reference to DllCall() // (it is an OUT parameter) DllCall( "Kernel32.dll", DC_CALL_STD , "GetVersionEx", @oVerInfo ) // display result of API MsgInfo(str(oVerInfo:dwMajorVersion)) // result: 0 MsgInfo(str(oVerInfo:dwMinorVersion)) // result: 0 MsgInfo(str(oVerInfo:dwBuildNumber)) // result: 0 // this member contains a byte array // retrieve it as character string MsgInfo(oVerInfo:szCSDVersion:asString()) // result: blank spaces RETURN
C Struct
Pat, Please try to build it NOT linking the FWH libraries. It may be a function conflict name due to the versions that you are using.
C Struct
Hi Antonio, Thanks for your reply. I compiled a DOS version of just the PRG (renaming the FWH folder to fool xBuildW that there was no Fivewin installed). I replace? the MsgInfo() with ? and I get the same result. I have managed to call other DLLs successfully in the past, but not using cStructures (this was using the exact same versions of xHB and FWH). The bigger picture is that I am interfacing to a Digital Persona bioscan SDK and was having troubles, so went back to a documented example using c Structures as parameters. Interestingly I made some calls to the GetTimeZoneInformation function of kernel32.dll and was able to get meaningful returns only for StandardName and DaylightName. Other things like StandardDate:wHour, for example return 0 as well. I am confused. Cheers, Pat.
C Struct
Pat, Based on your results, to me it seems as a xharbour bug. I suggest you to contact xhb.com and report it to them. We can't help you on that, sorry. Why don't you create an import library from the DLL that you need to manage and then use direct link using some C wrappers ? Its very easy and you have the FWH sources at winapi folder plenty of examples <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> If you need help just say it. Also I take the oportunity to insist that you (all of you) migrate to Harbour (many readers will say here: "oh, Antonio again on the same") but Harbour is rock solid , with a growing ang growing users base, and you will be happier and we will have less tech support <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C Struct
Hi Antonio, Thanks again for your reply and advice. So you are advising that I move from xHarbour to Harbour, yes? I am open to this advice, but I am not a C programmer. For me using xHB.com was a cheater's way of remaining C illiterate when I moved from Clipper, thus allowing me to focus on delivering client applications. Lazy, I know. My biggest concern is the many applications I have that are using Fivewin/xHB. By moving to Fivewin/Harbour, what will I lose? I know there is more to gain you say <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Anyway I am going to give it a go. Can you point me to a "getting started document" to download harbour and comile one of my existing programs, please? Thanks again, Antonio. Cheers, Pat.
C Struct
In the forum you will find many examples of the use of harbour: mak, bat, etc., also included in the distribution FWH faith. Also: <!-- m --><a class="postlink" href="http://harbour.github.io/faq/index.html">http://harbour.github.io/faq/index.html</a><!-- m -->
C Struct
Pat, You can download the most recent Harbour for Borland that we have published from here: [url:2selqmui]https&#58;//code&#46;google&#46;com/p/harbour-and-xharbour-builds/downloads/detail?name=harbour_bcc582_20131007&#46;zip[/url:2selqmui] Please send me an email and I will explain you where to download Borland bcc582 To build your app, you just need this two go.bat and test.mak file: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=160199#p160199">viewtopic.php?p=160199#p160199</a><!-- l --> You will not notice at all that you are using a C compiler to generate the harbour OBJs <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C Struct
Antonio, [quote="Antonio Linares":3gyrw3tb]Also I take the oportunity to insist that you (all of you) migrate to Harbour (many readers will say here: "oh, Antonio again on the same") but Harbour is rock solid , with a growing ang growing users base, and you will be happier and we will have less tech support <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:3gyrw3tb] Any news regarding OleDefaultArg() function in Harbour? EMG
C Struct
I am not able to locate hbole.ch in habour\include folder.
C Struct
Enrico, Finally (thanks to Przemek) #include "hbole.ch" #define WIN_DISP_E_PARAMNOTFOUND ( 0x80020004L ) function OleDefaultArg() return __oleVariantNew( WIN_VT_ERROR, WIN_DISP_E_PARAMNOTFOUND )
C Struct
Antonio, thank you! I'll try Harbour again. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
C Struct
Here it is: [url:1767anff]https&#58;//github&#46;com/harbour/core/tree/master/contrib/hbwin[/url:1767anff]
C Struct
Antonio, thank you. EMG
C Struct
[quote="Enrico Maria Giordano":otadirmi]Antonio, [quote="Antonio Linares":otadirmi]Also I take the oportunity to insist that you (all of you) migrate to Harbour (many readers will say here: "oh, Antonio again on the same") but Harbour is rock solid , with a growing ang growing users base, and you will be happier and we will have less tech support <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:otadirmi] Any news regarding OleDefaultArg() function in Harbour? EMG[/quote:otadirmi] Enrico You can give an example of using this function OleDefaultArg ()? Puedes poner un ejemplo de uso de esta funcion OleDefaultArg()? I found this link <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=27404&hilit=OleDefaultArg&start=30#p152620">viewtopic.php?f=3&t=27404&hilit=OleDefaultArg&start=30#p152620</a><!-- l --> No entiendo en qué tipo de parámetros se puede usar I do not understand what kind of parameters can be used
C Struct
Cristobal, [quote="cnavarro":1x8n8qgm]You can give an example of using this function OleDefaultArg ()? Puedes poner un ejemplo de uso de esta funcion OleDefaultArg()? I found this link <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=27404&hilit=OleDefaultArg&start=30#p152620">viewtopic.php?f=3&t=27404&hilit=OleDefaultArg&start=30#p152620</a><!-- l --> No entiendo en qué tipo de parámetros se puede usar I do not understand what kind of parameters can be used[/quote:1x8n8qgm] It is in the link you reported. EMG
C Struct
Cristobal, OleDefaultArg() is to OLE quite similar to what NIL is to Harbour <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C Struct
And the function picks the right type of parameter? I get it, so no need to take into account all the parameters of filling functions, no? Y la funcion recoge el tipo de parámetro adecuado? Ya entiendo, asi no hay que tener en cuenta rellenar todos los parámetros de las funciones, no?
C Struct
Cristobal, I have never needed it but I guess so. Enrico has been using it for long time so surely he may be able to complete my description <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C Struct
Antonio, Cristobal, [quote="Antonio Linares":372t74e0]Cristobal, I have never needed it but I guess so. Enrico has been using it for long time so surely he may be able to complete my description <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:372t74e0] What I know is that some OLE methods fail if OleDefaultArg() is not used for some missing parameters (not necessarily all of them). Samples: [code=fw:372t74e0]<div class="fw" id="{CB}" style="font-family: monospace;">oSel:<span style="color: #000000;">InsertFile</span><span style="color: #000000;">&#40;</span> cTmp, OLEDEFAULTARG<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .F. <span style="color: #000000;">&#41;</span><br /><br />oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> cXls, , , OLEDEFAULTARG<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, , , , OLEDEFAULTARG<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, , , .T., , .T. <span style="color: #000000;">&#41;</span></div>[/code:372t74e0] EMG
C Struct
[quote="Antonio Linares":k9g3vos9]Cristobal, I have never needed it but I guess so. Enrico has been using it for long time so surely he may be able to complete my description <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:k9g3vos9] I have also been using.
C Struct
Thanks Enrico, Rao
C Struct
Anyway the entire discussion started with using C Struct of xHarbour. May be, xHarbour's implementation has some issues. But FWH also implements C Structures for its own use. Please refer to struct.ch and tstruct.prg and examples in samples folder. Using the STRUCT command for C structures for interfacing with Windows API has been working well for FWH. My be one can use FWH's built in C Struct, instead of xHarbour's C Struct
C Struct
Rao, [quote="nageswaragunupudi":1ju6xmss]Anyway the entire discussion started with using C Struct of xHarbour. May be, xHarbour's implementation has some issues.[/quote:1ju6xmss] I need of a reduced and self-contained sample of the problem in order to try to fix it. A sample that I can build and run here. Without it I can't fix anything, sorry. EMG
C Struct
Pat, As I said at the beginning, when you are going to manage complex C structures, the best way to do it is from C language. Its really easy, as you don't need to master the C language. With a little example you will be able to understand it and do it yourself <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> From FWH provided source code (FWH\source\winapi\wndis.c), Just place this code at the bottom of your main PRG: [code=fw:251g8gxd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GETVERSION <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//  --> anVersions</span><br /><span style="color: #000000;">&#123;</span><br />      OSVERSIONINFO vi;<br /><br />      vi.dwOSVersionInfoSize = sizeof<span style="color: #000000;">&#40;</span> OSVERSIONINFO <span style="color: #000000;">&#41;</span>;<br />      GetVersionEx<span style="color: #000000;">&#40;</span> &vi <span style="color: #000000;">&#41;</span>;<br /><br />      hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br /><br />      hb_storvnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> long <span style="color: #000000;">&#41;</span> vi.dwMajorVersion, <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />      hb_storvnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> long <span style="color: #000000;">&#41;</span> vi.dwMinorVersion, <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />      hb_storvnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> long <span style="color: #000000;">&#41;</span> vi.dwBuildNumber,  <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />      hb_storvnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> long <span style="color: #000000;">&#41;</span> vi.dwPlatformId,   <span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />      hb_storvc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> char * <span style="color: #000000;">&#41;</span> vi.szCSDVersion,   <span style="color: #000000;">-1</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:251g8gxd]
C Struct -> Harbour Using Help!!
Dear All C Struct -> Harbour Using Help!! Harbour Function from C structure to assign a value. The value read from the Harbour Function C struct is different. 1) passed Value: 10 2) read Value: 2 [code=fw:3vyfrbss]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/* Harbour Sample Function */</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ...   <br />   oWnd:<span style="color: #000000;">bCommNotify</span> = <span style="color: #000000;">&#123;</span> | pParam, nValue | EventNotify<span style="color: #000000;">&#40;</span> pParam, nValue <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <br />   oThread := ThreadOn<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">20</span>, oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>      <span style="color: #B900B9;">// Input Parameter 10, 20, oWnd:hWnd</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">Function</span> EventNotify<span style="color: #000000;">&#40;</span> pParam, nValue <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GetWaitData<span style="color: #000000;">&#40;</span> pParam <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>             <span style="color: #B900B9;">// Return Value 2</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">/*---------------------------------------------------------------------------------------*/</span><br /><br /><span style="color: #B900B9;">/* C Function Sample Source */</span><br /><br />typedef struct thread_param<br /><span style="color: #000000;">&#123;</span> <br />     long nParamNo;<br />     int  nIndexCode;  <br /><span style="color: #000000;">&#125;</span> THREAD_PARAM, *LPTHREAD_PARAM;<br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> THREADON <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    DWORD dwThreadID;<br />    HANDLE hThread;<br /><br />    LPTHREAD_PARAM pWaitParam = <span style="color: #000000;">&#40;</span> LPTHREAD_PARAM <span style="color: #000000;">&#41;</span> hb_xgrab<span style="color: #000000;">&#40;</span> sizeof<span style="color: #000000;">&#40;</span> THREAD_PARAM <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />      <br />    memset<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> char * <span style="color: #000000;">&#41;</span>pWaitParam, <span style="color: #000000;">0</span>, sizeof<span style="color: #000000;">&#40;</span> THREAD_PARAM <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />      <br />    pWaitParam->nParamNo = hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>; <br />    pWaitParam->nIndexCode = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>; <br />      <br />    CommNotifyHwnd = <span style="color: #000000;">&#40;</span>HWND<span style="color: #000000;">&#41;</span>hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br /><br />    hThread = CreateThread<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span>LPTHREAD_START_ROUTINE<span style="color: #000000;">&#41;</span>WaitThread, <span style="color: #000000;">&#40;</span>LPVOID<span style="color: #000000;">&#41;</span>pWaitParam, <span style="color: #000000;">0</span>, &dwThreadID <span style="color: #000000;">&#41;</span>;<br />    ....<br /><span style="color: #000000;">&#125;</span><br /><br /><br />DWORD WINAPI WaitThread<span style="color: #000000;">&#40;</span> LPVOID pVoid <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dwExitCode;<br />   LPTHREAD_PARAM pWaitParam = <span style="color: #000000;">&#40;</span>LPTHREAD_PARAM<span style="color: #000000;">&#41;</span>pVoid;<br /><br />   SendMessage<span style="color: #000000;">&#40;</span> CommNotifyHwnd, WM_COMMNOTIFY, <span style="color: #000000;">&#40;</span>WPARAM<span style="color: #000000;">&#41;</span>pWaitParam, <span style="color: #000000;">&#40;</span>LPARAM<span style="color: #000000;">&#41;</span><span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br />   ....<br /><span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GETWAITDATA <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   LPTHREAD_PARAM pWaitParam = <span style="color: #000000;">&#40;</span>LPTHREAD_PARAM<span style="color: #000000;">&#41;</span>hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span>;<br />   hb_retnl<span style="color: #000000;">&#40;</span> pWaitParam->nParamNo <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:3vyfrbss] Thanks
C Struct -> Harbour Using Help!!
Are you returning pWaitParam to high level (PRG) ? It is not in your code... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C Struct -> Harbour Using Help!!
Thank you for your answer Antonio. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> oknbs.
C a n a l F i v e - Urgente una ayuda
Hola Amigos del foro: [b:35s9u6ks]Necesito urgente una ayudita.[/b:35s9u6ks] Alguien me puede dar un telefono o celular de contacto de Paco Garcia de C a n a l F i v e. o la dirección para mandarle una nota escrita. Le enviado varios correos, los cuales llegan a destino ( pues no me rebotan ) pero no tengo respuesta alguna. Estoy muy complicado <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> con unos controles que le compre y necesito ubicarlo URGENTE !!. Cualquier ayuda se los agradezco. Saludos,
C a n a l F i v e - Urgente una ayuda
Hola, podrias plantear el problema, tal vez entre todos podamos ayudarte, Paco ya no dá soporte a productos fwh..., es más creo q hasta ya no programa. Salu2, Ariel.
C a n a l F i v e - Urgente una ayuda
Gracias Ariel por responder- pero es un problema de los códigos fuentes. Necesito conversarlo con él. Saludos,
C a n a l F i v e - Urgente una ayuda
jcaro, postea tu dirección de correo para que puedan ubicarte, creo que es lo más conveniente.
C a n a l F i v e - Urgente una ayuda
Gracias William : Mi correo es jcaro ( arroba) .mitaller.cl Es muy urgente hablar con Paco - no tengo problemas en llamarlo a España o donde este. Solo que se comunique conmigo o que me dijan como !! <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> . Saludos, r
C a n a l F i v e - Urgente una ayuda
Informo que Paco se contacto conmigo y todo esta [b:lpmpjcm6]solucionado !![/b:lpmpjcm6] <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Gracias a todos los que me ayudaron , saludos.
C a n a l F i v e - Urgente una ayuda
jcaro, Ves que tan fácil es colocar nuestro correo y esperar ayuda. así de simple.
C a n a l F i v e - Urgente una ayuda
[b:bnfh2x17]GRACIAS[/b:bnfh2x17] William: Es cierto eso, pero a veces uno evita poner el mail - porque lo bombardean despues con correos basura o spam- Es mas que nada una medida de filtro. Saludos,
C into PRG problem-RESOLVED
Hi When I maintain my old application. xHarbour v1.2.3 / FWH1312 I have C code in PRG below: [code=fw:1zk0ldns]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br />   <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><br />   int  WINAPI PEA_SamExeNhiQuery<span style="color: #000000;">&#40;</span>LPSTR cHostname, int nPort, LPSTR cBuscode, int nCom, LPSTR cDocid, LPSTR cPatdid, LPSTR cPatbirth<span style="color: #000000;">&#41;</span>;<br />   void WINAPI PEA_GetMsg<span style="color: #000000;">&#40;</span>LPSTR cBuffer,int * nLen <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PEA_SAMEXENHIQUERY <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />     LPSTR  cHostname = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> ;<br />     int    nPort     = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>;<br />     LPSTR  cBuscode  = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> ;<br />     int    nCom      = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span>;<br />     LPSTR  cDocid    = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span> ;<br />     LPSTR  cPatdid   = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#41;</span> ;<br />     LPSTR  cPatbirth = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#41;</span> ;<br />     int    nErrCode ;<br /><br />     nErrCode = PEA_SamExeNhiQuery<span style="color: #000000;">&#40;</span>cHostname,nPort,cBuscode,nCom,cDocid,cPatdid,cPatbirth <span style="color: #000000;">&#41;</span> ;<br /><br />     hb_retni<span style="color: #000000;">&#40;</span> nErrCode <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PEA_GETMSG <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />     LPSTR  cBuffer = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>;<br />     long   nLen    = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>;<br />     PEA_GetMsg<span style="color: #000000;">&#40;</span> cBuffer, &nLen <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP <br /> </div>[/code:1zk0ldns] When I compile it. appear error message below: hb_retni( nErrCode ); Undefined symbol 'hb_stackST' Any suggestion?
C into PRG problem-RESOLVED
<!-- m --><a class="postlink" href="https://comp.lang.xharbour.narkive.com/ixJp2vGG/compilation-problemm">https://comp.lang.xharbour.narkive.com/ ... n-problemm</a><!-- m -->
C into PRG problem-RESOLVED
[code=fw:1i44a380]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br />&nbsp; &nbsp;<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br />&nbsp; &nbsp;<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br />&nbsp; &nbsp;...<br />&nbsp;</div>[/code:1i44a380]
C into PRG problem-RESOLVED
[quote="carlos vargas":32oaffir][code=fw:32oaffir]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br />   <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br />   <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br />   ...<br /> </div>[/code:32oaffir][/quote:32oaffir] I will try it again. Thank you so much.
C into PRG problem-RESOLVED
[quote="hmpaquito":3c60b57v]https://comp.lang.xharbour.narkive.com/ixJp2vGG/compilation-problemm[/quote:3c60b57v] Thanks for your good information.
C into PRG problem-RESOLVED
A better way is: #include <windows.h> #include <hbapi.h> Means to look for them in the include paths
C into PRG problem-RESOLVED
[quote="Antonio Linares":3pmstgk9]A better way is: #include <windows.h> #include <hbapi.h> Means to look for them in the include paths[/quote:3pmstgk9] Antonio, Solved! Thank you.
C language #define # and ## operators use
This is supported by C compilers, but I guess it is a quite unknown feature: A single #name stringify the name A double ## joins two names [code=fw:3ebm9dqx]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><br /><span style="color: #00D7D7;">#define</span> MEMBER<span style="color: #000000;">&#40;</span>TYPE,<span style="color: #0000ff;">NAME</span>,MORE<span style="color: #000000;">&#41;</span> TYPE <span style="color: #0000ff;">NAME</span> MORE<br /><br /><span style="color: #00D7D7;">#define</span> TSTRUCT<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">NAME</span>,MEMBERS<span style="color: #000000;">&#41;</span> \<br />typedef struct <span style="color: #0000ff;">NAME</span> <span style="color: #000000;">&#123;</span> \<br />MEMBERS \<br /><span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">NAME</span>; \<br />const char* const <span style="color: #0000ff;">NAME</span>##_Members = #MEMBERS;<br /><br />TSTRUCT<span style="color: #000000;">&#40;</span>S,<br /> MEMBER<span style="color: #000000;">&#40;</span>int,x;,<br /> MEMBER<span style="color: #000000;">&#40;</span>void*,z<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>;,<br /> MEMBER<span style="color: #000000;">&#40;</span>char,<span style="color: #000000;">&#40;</span>*f<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>char,char<span style="color: #000000;">&#41;</span>;,<br /> MEMBER<span style="color: #000000;">&#40;</span>char,y;,<br /><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> TEST <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   S test;<br /><br />   hb_retni<span style="color: #000000;">&#40;</span> test.x <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #B900B9;">// hb_retc( S_Members );</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:3ebm9dqx]
C para Sr. Antonio
Sr. Antonio como declarar esta função em FIVEWIN: short int (STDCALL *SWEDA_CapturarDispositivo) (short int Dispositivo, short int Opcoes, char *Arquivo, short int Extensao, long Timeout, TCallBackCD CallBack, void *Instancia); tentei assim: #include <hbapi.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <string.h> #include "loadlib.h" typedef int (*fSWEDA_CapturarDispositivo) (short int Dispositivo, short int Opcoes, char *Arquivo, short int Extensao, long Timeout, void *CallBack, void *Instancia); static void *pLib = NULL; static fSWEDA_CapturarDispositivo SWEDA_CapturarDispositivo = NULL; /******************************************************************************/ HB_FUNC(INICIASWD) { char cErrMsg[1024] = {0}; // char cLibPrinc[] = "libswmfd.so.0"; char cLibPrinc[] = "libswmfd.so"; int iRet = FALSE; if (pLib == NULL) { if ((pLib = LoadLib(cLibPrinc, TRUE, cErrMsg)) == NULL); else if ((SWEDA_CapturarDispositivo = (fSWEDA_CapturarDispositivo) GetFunc(pLib, "SWEDA_CapturarDispositivo" , cLibPrinc, cErrMsg)) == NULL); else iRet = TRUE; } if (!iRet) { hb_storc(cErrMsg, 1); hb_retl(iRet); } else { hb_retl(iRet); } } HB_FUNC(_SWEDATES) { short int a = hb_parni(1); short int b = hb_parni(2); char c[150] = {0} ; short int d = hb_parnl(4); long e = hb_parnl(5); char f[150] = {0} ; char g[150] = {0} ; strcpy(c, hb_parc(3)); strcpy(f, hb_parc(6)); strcpy(g, hb_parc(7)); ErroFunc(SWEDA_CapturarDispositivo,"SWEDA_CapturarDispositivo"); hb_retni(SWEDA_CapturarDispositivo(a, b, c, d, e, f, g)); } Chamo ela assim: _SWEDATES(1,0,'',0,15000) Mais o sistema encerra sem dar nenhuma mensagem de erro.
C para Sr. Antonio
SGS, These lines are wrongly declared: char c[150] = {0} ; char f[150] = {0} ; char g[150] = {0} ; Please change them this way: char c[150]; char f[150]; char g[150];
C para Sr. Antonio
Obrigado Sr. Antonio.
C problem harbour compile 32 bit
Hi I try to convert xHarbour to Harbour. when I recompile some C file that appear error. How to compatible Harbour? [code=fw:2ku5o0hx]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cText = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span>, n <span style="color: #000000;">&#41;</span> ; =>Line <span style="color: #000000;">229</span><br />cText = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, n <span style="color: #000000;">&#41;</span> ; =>Line <span style="color: #000000;">513</span><br />nX    = hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span>, n <span style="color: #000000;">&#41;</span> ;  =>Line <span style="color: #000000;">514</span><br />cText = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, n <span style="color: #000000;">&#41;</span> ; =>Line <span style="color: #000000;">553</span><br />nX    = hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span>, n <span style="color: #000000;">&#41;</span> ; =>Line <span style="color: #000000;">554</span><br />nX = hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> ; =>Line <span style="color: #000000;">591</span><br /> </div>[/code:2ku5o0hx] [quote:2ku5o0hx] Harbour 3.2.0dev (r1603082110) ... Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc. Obj\TextTool.C: Warning W8075 Obj\TextTool.C 13: Suspicious pointer conversion in function HB_FUN_KWTEXT Warning W8075 Obj\TextTool.C 38: Suspicious pointer conversion in function HB_FUN_DRTEXT Warning W8075 Obj\TextTool.C 64: Suspicious pointer conversion in function HB_FUN_DR3DTEXT Error E2227 Obj\TextTool.C 229: Extra parameter in call to hb_parc in function HB_FUN_DR3DMULTI Warning W8075 Obj\TextTool.C 229: Suspicious pointer conversion in function HB_FUN_DR3DMULTI Warning W8075 Obj\TextTool.C 351: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 355: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 375: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 376: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 377: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 378: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 380: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 381: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 383: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 385: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 387: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 393: Suspicious pointer conversion in function GradeText Warning W8075 Obj\TextTool.C 429: Suspicious pointer conversion in function HB_FUN_DRGRDTXT Error E2227 Obj\TextTool.C 513: Extra parameter in call to hb_parc in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 513: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Error E2227 Obj\TextTool.C 514: Extra parameter in call to hb_parnl in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 530: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 534: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Error E2227 Obj\TextTool.C 553: Extra parameter in call to hb_parc in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 553: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Error E2227 Obj\TextTool.C 554: Extra parameter in call to hb_parnl in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 569: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 570: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 571: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 572: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 574: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 575: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 577: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 579: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 581: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Warning W8075 Obj\TextTool.C 585: Suspicious pointer conversion in function HB_FUN_MULGRDTXT Error E2227 Obj\TextTool.C 591: Extra parameter in call to hb_parnl in function HB_FUN_MULGRDTXT [/quote:2ku5o0hx]
C problem harbour compile 32 bit
cText = ( char * ) hb_parc( 6, n )
C problem harbour compile 32 bit
Hi I use these code work fine for xHarbour , but not work Harbour. It's appear error message Error E0030 Syntax error "syntax error at 'L'" [code=fw:38wg0h2v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> MF_BYPOSITION 0x0400L<br /><span style="color: #00D7D7;">#define</span> MF_BYCOMMAND  0x0000L<br /><span style="color: #00D7D7;">#define</span> MF_GRAYED     0x0001L<br /><span style="color: #00D7D7;">#define</span> SC_CLOSE      0xF060L<br /><br /><span style="color: #00C800;">FUNCTION</span> NoCloseButton<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">// puedes usar cualquiera de estas 2 opciones</span><br />   EnableMenuItem<span style="color: #000000;">&#40;</span> GetSystemMenu<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span>, .F. <span style="color: #000000;">&#41;</span>, SC_CLOSE, nOr<span style="color: #000000;">&#40;</span> MF_BYCOMMAND, MF_GRAYED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//=> This Line ERROR</span><br />   <span style="color: #B900B9;">//ModifyMenu( GetSystemMenu( oWnd:hWnd, .F. ), SC_CLOSE, nOr( MF_BYCOMMAND, MF_GRAYED), -10, "Close")</span><br />   DrawMenuBar<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// actualiza el menu</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span><br /> </div>[/code:38wg0h2v]
C problem harbour compile 32 bit
Yes, Try with [code=fw:3pkruh62]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> MF_BYPOSITION 0x0400<br /><span style="color: #00D7D7;">#define</span> MF_BYCOMMAND &nbsp;0x0000<br /><span style="color: #00D7D7;">#define</span> MF_GRAYED &nbsp; &nbsp; 0x0001<br /><span style="color: #00D7D7;">#define</span> SC_CLOSE &nbsp; &nbsp; &nbsp;0xF060<br />&nbsp;</div>[/code:3pkruh62]
C problem harbour compile 32 bit
[quote="cnavarro":ic208f95]Yes, Try with [code=fw:ic208f95]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> MF_BYPOSITION 0x0400<br /><span style="color: #00D7D7;">#define</span> MF_BYCOMMAND  0x0000<br /><span style="color: #00D7D7;">#define</span> MF_GRAYED     0x0001<br /><span style="color: #00D7D7;">#define</span> SC_CLOSE      0xF060<br /> </div>[/code:ic208f95][/quote:ic208f95] Thanks a lot. working fine.
C wrapper help
Cristobal: Thank you for your reply. Still getting the same error. xLINK: error: Unresolved external symbol '_SmsGetProvider referenced from (Testsms.obj)'. Thanks, Randal
C wrapper help
All, I am trying to write a C wrapper for a function. I've used the DLL command successfully for most of the functions however this function I think is going to require a C wrapper. I do have the lib for this function as well. This particular function populates a C structure with values. I need to call the function and then return the values in C structure to my .prg. I found a sample on the forum and tried to duplicate it but have not been successful. The error I'm getting is: xLINK: error: Unresolved external symbol '_SMSGETPROVIDER referenced from (Testsms.obj)'.xLINK: error: Unresolved external symbol '_SMSGETPROVIDER referenced from (Testsms.obj)'. This is a communications library named SocketTools. I've been using the DLL command version for sending emails via smtp for a few years and it works very well. I am using xHarbour. Below is my code. Definition of function from help file. /* INT WINAPI SmsGetProvider( LPCTSTR lpszPhoneNumber, LPSMSPROVIDER lpProvider ); */ #INCLUDE "fivewin.ch" FUNCTION TestSms SmsGetProvider( ) RETURN NIL #pragma BEGINDUMP #include <windows.h> #include <hbapi.h> #define SMS_MAXPROVIDERGUIDLEN 38 #define SMS_MAXPROVIDERNAMELEN 128 #define SMS_MAXCOMPANYNAMELEN 128 #define SMS_MAXDOMAINNAMELEN 128 typedef struct tagSMS_PROVIDER { int nProviderId; int nCountryCode; int nRegionCode; int nMessageLength; char szGuid[SMS_MAXPROVIDERGUIDLEN]; char szName[SMS_MAXPROVIDERNAMELEN]; char szCompany[SMS_MAXCOMPANYNAMELEN]; char szDomain[SMS_MAXDOMAINNAMELEN]; } SMS_PROVIDER ; HB_FUNC ( SMSGETPROVIDER ) { SMS_PROVIDER aProvider ; aProvider.nProviderId = hb_parnl( 1, 1 ); aProvider.nCountryCode = hb_parnl( 1, 2 ); aProvider.nRegionCode = hb_parnl( 1, 3 ); aProvider.nMessageLength = hb_parnl( 1, 4 ); hb_retnl( SMSGETPROVIDER(&aProvider) ); } #pragma ENDDUMP Here is the .DEF contents if it helps. LIBRARY "CSTXTAV8.DLL" EXPORTS SmsInitializeA @1 SmsInitializeW @2 SmsUninitialize @3 SmsEnableTraceA @4 SmsEnableTraceW @5 SmsDisableTrace @6 SmsEnumProvidersA @7 SmsEnumProvidersW @8 SmsGetErrorStringA @9 SmsGetErrorStringW @10 SmsGetFirstProviderA @11 SmsGetFirstProviderW @12 SmsGetGatewayA @13 SmsGetGatewayW @14 SmsGetLastError @15 SmsGetNextProviderA @16 SmsGetNextProviderW @17 SmsGetProviderA @18 SmsGetProviderW @19 SmsSendMessageA @20 SmsSendMessageW @21 SmsSetLastError @22 Any help greatly appreciated. Thanks, Randal
C wrapper help
First test with [quote:3m5k86tv] aProvider.nProviderId = hb_parni( 1, 1 ); aProvider.nCountryCode = hb_parni( 1, 2 ); aProvider.nRegionCode = hb_parni( 1, 3 ); aProvider.nMessageLength = hb_parni( 1, 4 ); hb_retnl( [b:3m5k86tv]SmsGetProvider[/b:3m5k86tv](&aProvider) ); // C is Case sensitive [/quote:3m5k86tv]
C wrapper help
They have not provided any .h header file ?
C wrapper help
Yes, there is a header file. I've added that to the top of my .prg but still get the same error message. The header file is rather long so here is the portion of the header file that pertains to the function I'm trying to use. If you need the whole .h file let me know. typedef struct _SMSPROVIDERW { INT nProviderId; INT nCountryCode; INT nRegionCode; INT nMessageLength; DWORD dwFlags; DWORD dwReserved; WCHAR szGuid[SMS_MAXPROVIDERGUIDLEN]; WCHAR szName[SMS_MAXPROVIDERNAMELEN]; WCHAR szCompany[SMS_MAXCOMPANYNAMELEN]; WCHAR szDomain[SMS_MAXDOMAINNAMELEN]; } SMSPROVIDERW, *LPSMSPROVIDERW; typedef struct _SMSPROVIDERA { INT nProviderId; INT nCountryCode; INT nRegionCode; INT nMessageLength; DWORD dwFlags; DWORD dwReserved; CHAR szGuid[SMS_MAXPROVIDERGUIDLEN]; CHAR szName[SMS_MAXPROVIDERNAMELEN]; CHAR szCompany[SMS_MAXCOMPANYNAMELEN]; CHAR szDomain[SMS_MAXDOMAINNAMELEN]; } SMSPROVIDERA, *LPSMSPROVIDERA; #ifdef UNICODE #define SMSPROVIDER SMSPROVIDERW #define LPSMSPROVIDER LPSMSPROVIDERW #else #define SMSPROVIDER SMSPROVIDERA #define LPSMSPROVIDER LPSMSPROVIDERA #endif Here are the functions defined in the .h file... PUBLIC INT WINAPI SmsGetProviderW( IN LPCWSTR lpszPhoneNumber, OUT LPSMSPROVIDERW lpProvider ); PUBLIC INT WINAPI SmsGetProviderA( IN LPCSTR lpszPhoneNumber, OUT LPSMSPROVIDERA lpProvider ); #ifdef UNICODE #define SmsGetProvider SmsGetProviderW #else #define SmsGetProvider SmsGetProviderA #endif I have tried changing the function name to include A or W as above but still get the same error. xLINK: error: Unresolved external symbol '_SmsGetProviderW referenced from (Testsms.obj)'. Thanks, Randal
C wrapper help
You have to link some libs they surely provide containing the undefined function. EMG
C wrapper help
Enrico: Thanks for your reply. They do provide a lib and dll and I am linking the library file. Here is a list of functions from the lib. CSTXTAV8.DLL:__IMPORT_DESCRIPTOR_CSTXTAV8 CSTXTAV8.DLL:__NULL_IMPORT_DESCRIPTOR CSTXTAV8.DLL:CSTXTAV8_NULL_THUNK_DATA CSTXTAV8.DLL:_SmsDisableTrace@0 CSTXTAV8.DLL:_SmsEnableTraceA@8 CSTXTAV8.DLL:_SmsEnableTraceW@8 CSTXTAV8.DLL:_SmsEnumProvidersA@12 CSTXTAV8.DLL:_SmsEnumProvidersW@12 CSTXTAV8.DLL:_SmsGetErrorStringA@12 CSTXTAV8.DLL:_SmsGetErrorStringW@12 CSTXTAV8.DLL:_SmsGetFirstProviderA@8 CSTXTAV8.DLL:_SmsGetFirstProviderW@8 CSTXTAV8.DLL:_SmsGetGatewayA@12 CSTXTAV8.DLL:_SmsGetGatewayW@12 CSTXTAV8.DLL:_SmsGetLastError@0 CSTXTAV8.DLL:_SmsGetNextProviderA@8 CSTXTAV8.DLL:_SmsGetNextProviderW@8 CSTXTAV8.DLL:_SmsGetProviderA@8 CSTXTAV8.DLL:_SmsGetProviderW@8 CSTXTAV8.DLL:_SmsInitializeA@8 CSTXTAV8.DLL:_SmsInitializeW@8 CSTXTAV8.DLL:_SmsSendMessageA@12 CSTXTAV8.DLL:_SmsSendMessageW@12 CSTXTAV8.DLL:_SmsSetLastError@4 CSTXTAV8.DLL:_SmsUninitialize@0 What am I doing wrong? Thanks, Randal
C wrapper help
How are you linking the lib? EMG
C wrapper help
[quote="Enrico Maria Giordano":1x0o9kvq]How are you linking the lib? EMG[/quote:1x0o9kvq] I'm using xBuilder so I've just added it to the project. I also tried using the command line option to make sure the lib is being linked and I get the same error. Thanks, Randal
C wrapper help
Randal, What error do you get ?
C wrapper help
[quote="Antonio Linares":2fj40z3t]Randal, What error do you get ?[/quote:2fj40z3t] xLINK: error: Unresolved external symbol '_SmsGetProvider referenced from (Testsms.obj)'. Thanks, Randal
C wrapper help
Randal, Please modify this line: hb_retnl( SMSGETPROVIDER(&aProvider) ); into: hb_retnl( SmsGetProviderA(&aProvider) );
C wrapper help
[quote="Antonio Linares":1baubtt3]Randal, Please modify this line: hb_retnl( SMSGETPROVIDER(&aProvider) ); into: hb_retnl( SmsGetProviderA(&aProvider) );[/quote:1baubtt3] I get the same error message. xLINK: error: Unresolved external symbol '_SmsGetProviderA referenced from (Testsms.obj)'. Randal
C wrapper help
The DLL is using C++ mode. So you need to compile your C code using C++ mode Using Borland or Microsoft this is quite easy. What C compiler are you using ? Could you use free xHarbour ? that would easily solve it.
C wrapper help
[quote="Antonio Linares":3l2odu1s]The DLL is using C++ mode. So you need to compile your C code using C++ mode Using Borland or Microsoft this is quite easy. What C compiler are you using ? Could you use free xHarbour ? that would easily solve it.[/quote:3l2odu1s] Antonio: I'm using xHarbour commercial and xCC. Is there anyway to compile this using xCC? Thanks, Randal
C wrapper help
Randal, I execute xcc.exe and get this: I don't see an option for C++ c:\xhb\bin>xcc Pelles ISO C Compiler, Version 3.00.0 (Beta) Copyright (c) Pelle Orinius 1999-2005 Syntax: xCC [options] srcfile{.C|.ASM} Options: /D<name>[=<text>] Define a preprocessor symbol /E Preprocess only (to stdout) /Fo<outfile> Name the output file /Gd Use __cdecl as default calling convention (default) /Gh Enable hook function call /Gm Don't decorate __stdcall or __fastcall symbols (if /Ze) /Gn Don't decorate exported __stdcall symbols (if /Ze) /Gr Use __fastcall as default calling convention (if /Ze) /Gz Use __stdcall as default calling convention (if /Ze) /I<path> Add a search path for #include files /J Default char type is unsigned /MD Enable dynamic C runtime library (POCRT.DLL) /MT Enable multi-threading support (CRTMT.LIB) /O1 Same as /Os /O2 Same as /Ot /Op[-] Improve floating-point consistency /Os Optimize, favor code space /Ot Optimize, favor code speed /Ox Perform maximum optimizations /T<target> Select output target (/T? displays a list) /U<name> Undefine a preprocessor symbol /V<n> Set verbosity level 0, 1 or 2 (default n = 0) /W<n> Set warning level 0, 1 or 2 (default n = 1) /X Don't search standard places for #include files /Zd Enable line number debugging information /Ze Enable Microsoft extensions /Zg Write function prototypes to stdout /Zi Enable full debugging information /Zl Omit default library name in object file /Zs Syntax check only /Zx Enable Pelles C extensions
C wrapper help
[url:qbpet7th]http&#58;//forum&#46;pellesc&#46;de/index&#46;php?topic=5117&#46;0[/url:qbpet7th] [quote:qbpet7th]Pelles C does not support C++[/quote:qbpet7th] If you want to use that DLL you may need to change your C compiler or maybe build a DLL that access the DLL in C++ EXE --> first DLL --> second C++ DLL complex but it may work
C'YaPass: Forget All Your Passwords
Buenas !!! Una utilidad que parece muy interesante [url:25qah74t]https&#58;//cyapass&#46;com/[/url:25qah74t]. Using CYaPass All you have to do is: Add / Select a SiteKey (reminds you which site the password is used for) Draw your secret pattern (it is never stored anywhere) The program remembers which password requirements (uppercase, special characters, length) are required by the site. The program generates your password and copies the password to your clipboard. You just paste the password wherever you need to use it. Watch this video which shows how you C'YaPass in action across devices (shown on iPhone and Windows, but it is the same on Android). [url:25qah74t]https&#58;//youtu&#46;be/05EzOreh_Fg[/url:25qah74t] Saludos,
C++ -> Fivewin
I have to convert an function in C++ to fivewin, but i'm having trouble with struct There is the files .CPP and .H <!-- m --><a class="postlink" href="http://www.4shared.com/file/6A3J6R76/RFDBinarioC.html">http://www.4shared.com/file/6A3J6R76/RFDBinarioC.html</a><!-- m --> Here is my BIGGEST trouble, the Struct DLLReadStatusData and the method LeStatus() [code=fw:5gc7olvp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#pragma</span> once<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br />typedef int <span style="color: #000000;">&#40;</span>WINAPI *TRATADORA<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>long lnErro, LPSTR szDescricao, char bErroNaoFatal <span style="color: #000000;">&#41;</span>;<br /><br />struct DLLReadStatusData <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; int nTamanhoStatus;<br />&nbsp; &nbsp; int nSituacaoAtual;<br />&nbsp; &nbsp; int nCodigoErro;<br />&nbsp; &nbsp; long lnTamanhoLeitura;<br />&nbsp; &nbsp; long lnProgressoLeitura;<br />&nbsp; &nbsp; char* szSituacaoAtual;<br /><span style="color: #000000;">&#125;</span>;<br /><br /><span style="color: #00C800;">class</span> CLeitura<br /><span style="color: #000000;">&#123;</span><br /><span style="color: #00C800;">public</span>:<br />&nbsp; &nbsp; <span style="color: #000000;">CLeitura</span><span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ~CLeitura<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Define o BaudRate de comunicação com a impressora</span><br />&nbsp; &nbsp; void DefineBaudRate<span style="color: #000000;">&#40;</span>long lnBaudRate<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Lê as memórias MF e MFD da impressora e grava em arquivo</span><br />&nbsp; &nbsp; int LeMemorias<span style="color: #000000;">&#40;</span>char* szPortaSerial, char* szNomeArquivo, char* szSerieECF, char bAguardaConcluirLeitura<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Cancelar a leitura das Memórias</span><br />&nbsp; &nbsp; void CancelaLeitura<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Lê a versão da DLL</span><br />&nbsp; &nbsp; void Versao<span style="color: #000000;">&#40;</span>char* szVersao<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Retorna o status atual do processo de Leitura</span><br />&nbsp; &nbsp; int LeStatus<span style="color: #000000;">&#40;</span>DLLReadStatusData* pStatusData<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Função usada para definir a função de callback que será responsável por tratar os erros da Leitura.dll</span><br />&nbsp; &nbsp; void TrataErro<span style="color: #000000;">&#40;</span>TRATADORA funcTratadora<span style="color: #000000;">&#41;</span>;<br /><span style="color: #00C800;">private</span>:<br />&nbsp; &nbsp; <span style="color: #B900B9;">// Handle para a Leitura.dll</span><br />&nbsp; &nbsp; HINSTANCE m_hLeituraDLL;<br /><span style="color: #000000;">&#125;</span>;<br />&nbsp;</div>[/code:5gc7olvp]
C++ -> Fivewin
Samir, What error do you get ?
C++ -> Fivewin
The program abort when I call de dll with the parameter as ptr. Ptr because I need to receive the var send by reference...
C++ -> Fivewin
Samir, Please show me how you are calling the DLL function from your PRG
C++ ?? xHarbour :(
Hi, How i do to create a object activeX or ole in C++ alone. i try init main(){ obj = CreateObject("progID"); return 0; } more no compile show me that dont have function createObject, i tryed too ToleAuto more too no work. Someone can help ? thanks
C++ ?? xHarbour :(
Lailton, You have to use the function CoCreateInstance(): [url:1wnnoiqj]http&#58;//msdn&#46;microsoft&#46;com/en-us/library/ms686615(VS&#46;85)&#46;aspx[/url:1wnnoiqj]
C++ ?? xHarbour :(
Thanks Antonio, U can show me a sample using this. i will try alone, but if u can show me a sample. thanks
C++ ?? xHarbour :(
Lailton, If you search in google for CoCreateInstance and CLSCTX_INPROC_SERVER you may find many examples. We don't have a simple example to provide, sorry.
C++ ?? xHarbour :(
Thanks. Im looking about this. more think that this not work in bcc55 fine. because all sample dont compile or dont have .h file. i will try download microsoft visual C++ to make test too. thanks.
C++ API for Oracle Database (Para Daniel Garcia-Gil)
Buenas tardes, Aca dejo el link para los que tienen proyectado desarrollar una clase para Oracle <!-- m --><a class="postlink" href="http://www.oracle.com/technetwork/database/occidownloads-083553.html">http://www.oracle.com/technetwork/datab ... 83553.html</a><!-- m --> Saludos,
C++ API for Oracle Database (Para Daniel Garcia-Gil)
Compuin, Me parece que harbour en las contrib sddoci habia algo ya avanzado para atacar oracle con su api. Saludos, Lautaro Moreira
C++ Redistributables Required
Until this past year, my builds with FWH, Harbour, and MSVC never required me to install the Microsoft C++ Redistributables. Now I must install both the current pair ( 32 & 64 bit ), and the 32 bit Version 12. Is there a tool I can use to see what, in my application, now requires these ? It all started when I completed a major upgrade to my software application, so something I may have added could be the cause, or it could be that the Visual Studio 2022 now requires this with it's libraries. Your thoughts are appreciated.
C++ Redistributables Required
Dear Tim, Could you please send me your old EXE and the current one using [url:lzj7fpbc]https&#58;//wormhole&#46;app/[/url:lzj7fpbc] ? I want to compare the required external DLLs for both EXEs thank you
C++ y DLL
Supongamos que creo una function en Borland C++ llamada MIFUNC() y que para ello empleo una function CFUNC() de una DLL externa, por ejemplo ICM32.DLL. Supongamos que todo va bien y se crea el OBJ correctamente. Cuando utilizo MIFUNC() en un PRG ¿necesito utilizar ICM32.DLL para compilar/linkar, o el algoritmo CFUNC() ya va embebido en el OBJ? Gracias. Saludos
C++ y DLL
Necesitas la DLL tambien. Tal como ocurre con el RDDADS. El RDDADS son un monton de wrappers a funciones que estan almacenadas en el ACE32.DLL, estas funciones utilizan a su vez otros DLLs como el ADSLOC32 y el AXWCS32.DLL, razon por lo cual aunque tengas que crear un ACE32.LIB a partir del ACE32.DLL, es necesrio incluir los DLLs que tienen dichas fucnions.
C++ y DLL
Muchas Gracias
C++2009
Hi to all: Only a comment: I,d just used C++2009 with Harbour and FWH April and everything go ok. I used a diferent anigif.c posted in this forum for that. Saludos Ruben Fernandez
C++2009
Estimados amigos: He tenido la oportunidad de probar Harbour y FWH Abril con C++2009 y funciono perfecto, sin problemas. Utilice una version de anigif.c que estaba en el foro dejada por Antonio. Solo es un comentario de una prueba que hice por si alguien le interesa. Saludos Ruben Fernandez
C++2009
Ruben, Do you mean Borland C++ 2009 ? Or MSVC ? Thanks for sharing your results <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
C++2009
Antonio: Borland C++ 2009 Regards Ruben Fernandez
C++2009
Hi, Is Borland C++ 2009 a Freeware ? Any specific advantage by using Borland C++ 2009, instead of the one (BCC55) which we all use right now ? Regards Anser
C++2009
Hi Anser: Borland C++2009 is not free, and I don´t know for any advantage over BCC5.5. I use Borland C++2009 trial version. Just to know if all was ok with this version. Than kyou, best regards Ruben Fernandez.
C++2009
Dear Mr.Ruben Thanks for the info. Regards Anser