Hi, First of all, excuse my poor English. I'm writing an app which needs to connect to HTTP using the WAP connection, which is not the dafault connection in the PDA (WinMobile) network settings. What I mean is, my app needs to connect using a connection which is not the default one. ¿Is this possible using C#? Thank you in advance.
Nandiator
Posts
-
Force use of WAP connection -
Load Type in DLL in a different AppDomainI'm afraid this doesn't work on Compact Framework 2.0. Thankyou anyway. 'System.AppDomain' no contiene una definición para 'Load' 'System.IO.File' no contiene una definición para 'ReadAllBytes' In English: 'System.AppDomain' doesn't contain a definition for 'Load' 'System.IO.File' doesn't contain a definition for 'ReadAllBytes'
-
Load Type in DLL in a different AppDomainThanks for your answer, but i'm afraid it doesn't work in compact framework (mobile), at least in NETCF 2.0. Thankyou anyway.
-
Load Type in DLL in a different AppDomainHi, First of all, excuse my English. My app (Compact Framework) loads 2 copies if the same dll (exactly the same DLL renamed) using reflection. The DLL should load the corresponding config file according to the DLL name (if the DLL is ModuleA.dll the config is ModuleA.txt, and so on). My problem is this: When I load the first DLL, everything goes OK, but when I load the second one when I do Assembly.LoadFrom( FullPath ) it loads the first DLL insteag of the 2nd one, despite the fact that FullPath contains the first DLL's path. In addition there are the variables which shoul be global to each DLL. As everything is loaded from the first DLL, the globals are the first DLL's ones. After looking for info I realised that what I need to do is to load each DLL in a different AppDomain, so they are isolated from each other. To summarize: One compilation: MyModule.dll 2 copies of the same DLL: MyModuleA.dll & MyModuleB.dll One config file for each DLL: MyModuleA.txt & MyModuleB.txt One appdomain for each DLL is needed. Anyone knows how to do this in Compact Framework?
-
Get full SOAP messageI have a webservice and I need to log the full SOAP message. I need to get the full SOAP message, including both SOAP Header and SOAP Body. [WebMethod] public string MyMethod() { string szSOAPMessage = ""; string szReply = ""; szSOAPMessage = ????(); // This is the part I need to know Log( szSOAPMessage ); DoSomething(); return szReply; } Does anybody know how to get it?
-
Oracle, CDatabase and multithreadHi you all. I have a thread intensive windows service written in Visual C++ for a communicacions app. There is a mother thread which launches child threads each of which opens a new connection to Oracle by means of the ODBC Driver. The child threads are created and die, buy sometimes a big amount of them can be created at the same time (about 200 threads when a massive alert is sent to the remote client apps) which mean that about 200 connections are opened against the driver and last for some time. My problem is that when this happens some threads are frozen in the Open function of the CDatabase connection. I tried to write a bit of code to test it (one loop which launched threads which just opened connections to the database and waited in an infinite loop to keep everything opened) and the problem persisted. But as this time it was a desktop app (not a winservice) an Oracle ODBC Driver Connect dialog showed asking for Service Name, User Name and Password. I tested the same code against a SQLServer driver and the app had no problem in launching all the threads. So now comes the question ¿is there a limit in oracle's driver for the number of connections per process? I am using Oracle's Driver version 10.01.00.31, the database is an Oracle 10gR1, and the service is written in Visual C++ (Visual Studio 2003). The database is not owned by us, so we cannot modify any parameters.
-
Error when calling stored procedure from CRecordsetHello, I am using MFC to call a stored procedure written in Oracle PL/SQL, but when I make the call I get the next error in Spanish: "No se enlazaron columnas antes de llamar a SQLFetchScroll o SQLExtendedFetch", which more or less in English means: "No rows were binded before calling SQLFetchScroll or SQLExtendedFetch". I am using a CRecordset derived class to access the stored procedure. I am unable to find the error. THE STORED PROCEDURE'S HEADER: Sp_Int_Ot_Ordendetrabajoalta ( lineatrabajo NUMBER, lv_orden NUMBER, usuario VARCHAR2, idvehiculo NUMBER, fechamax1 VARCHAR2, resumen VARCHAR2, detalle VARCHAR2, coderp VARCHAR2, numtrabrecibidos NUMBER, lv_CODOT VARCHAR2, retorno OUT INTEGER) THE .H FOR THE CRECORDSET DERIVED CLASS (Visual Studio 6 comments removed) class CRecSP : public CRecordset { public: CRecSP(CDatabase* pDatabase = NULL); DECLARE_DYNAMIC(CRecSP) CString m_szSQL; long m_RETORNO; virtual CString GetDefaultConnect(); virtual CString GetDefaultSQL(); virtual void DoFieldExchange(CFieldExchange* pFX); }; THE .CPP FOR THE CLASS (VS6 comments removed) IMPLEMENT_DYNAMIC(CRecSP, CRecordset) CRecSP::CRecSP(CDatabase* pdb) : CRecordset(pdb) { m_RETORNO = 0; m_nParams = 1; m_nDefaultType = snapshot; } CString CRecSP::GetDefaultConnect() { return _T( DB_CONNECTION_STRING ); } CString CRecSP::GetDefaultSQL() { return m_szSQL; } void CRecSP::DoFieldExchange(CFieldExchange* pFX) { pFX->SetFieldType(CFieldExchange::outputParam); RFX_Long(pFX, _T("[retorno]"), m_RETORNO ); } USING THE CRECORDSET DERIVED CLASS: (Vars read from EditBoxes as CStrings and formatted in the SQL) CRecSP *rec = new CRecSP(&db); szSQL.Format( "{CALL FGROT2005.SP_INT_OT_ORDENDETRABAJOALTA(%s,%s,'%s',%s,'%s','%s','%s','%s',%s,'%s',?)}", szLinea, szOrden, "USER", szIdVeh, szFechaMax, szResumen, szDetalle, "ERP", "0", szCodOT ); rec->m_szSQL = szSQL; //rec->Open( CRecordset::forwardOnly,szSQL,CRecordset::readOnly ); rec->Open( ); iError = rec->m_RETORNO; rec->Close(); -- modified at 3:49 Tuesday 6th September, 2005
-
ZModemGood night and happy New Year. Excuse my English as it's not my languaje. My problems are two: I've just began learning VC++ on my own :doh: and I need to send a file using ZModem protocol. I have searched for some code to learn from, but all I found was for Unix and wasn't commented or documented, so that and nothing is more or less the same. Could someone explain something practical (not history or comparatives with other protocols) about zmodem or tell me where I could find a ready to use c++ class or activeX. One more solution would be automating Hyperterminal, but i don't know if it's possible and as I said, I'm a beginner at VC++. Any info is wellcome. Thanks.