|
"_$h@nky_" wrote: Please tell me how can i remove this error "Record is too large."
Drop the table.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i m not drop the table.
please tell me any solution.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You should really make a better post in order to get any help. For instance post the relevant code and be more detailed and precise about the error (i.e. aat what line it occurs?).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try using smaller records (45s?) or switch to CDs like the rest of us
|
|
|
|
|
BTW: you should use the joke icon...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
i m using table in database, here diffrent type of data types i m using.
when i m add entries in table in form of special characters than this error comes.
i m not using very long data like for Text data type i m using less than 255 characters.
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: please help me for this.
Can you show your database schema? What code are you using to update the database? What is the exact error message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
hi,
I want to run an internet explorer on my application, which is C++ and on Microsoft Visual Studio (on PocketPc or Windows Mobile Platform).
I use a class CWebBrowser to work with this Control.
I use RegEdit for Mobile and I can't find the GUID of that control on my mobile, therefore the control does not create.
(GUID = 8856F961-340A-11D0-A96B-00C04FD705A2 )
(CLSID = { 0x8856f961, 0x340a, 0x11d0, { 0xa9, 0x6b, 0x0, 0xc0, 0x4f, 0xd7, 0x5, 0xa2 } } )
would someone help me to solve my problem.
Thanks
Miss_F
modified on Thursday, February 5, 2009 5:35 AM
|
|
|
|
|
The REFIID of Pocket Internet Explorer is: L"Microsoft.PIEDocView" .
cheers,
AR
|
|
|
|
|
Thanks for your answer,
I found that CLSID of the "Microsoft.PIEDocView" which was {F5AFC7EF-1571-48B6-A69C-F1833F4C3A44} , I changed the CLSID of CWebBrowser to that, and the Message blew was writen:
...
Load module: browsres.96.dll
Persistence not supported on OLE control {F5AFC7EF-1571-48B6-A69C-F1833F4C3A44}.
>>> Result code: 0x00000000
Load module: WEBVIEW.DLL
...
and the control did not create.
Do you know waht can I do with that?
Regards
Miss_F
|
|
|
|
|
Hi,
Maybe you didn't call ::CoInitializeEx() or otherwise initialize properly.
For diagnostic, compile the ATL sample in <Windows Mobile [5 | 6]\Samples\PocketPC\CPP\ATL\Minipie> and/or the WTL adaptation in <WTL8>\Samples\MiniPie and run the result on your device.
On success, your development environment is OK and there is a problem in your code, otherwise the problem is on your development platform.
cheers,
AR
|
|
|
|
|
Hi,
Thanks a lot for your help,
i run the sample and it works properly, i think i must change my codes.
Regards
Miss_F
|
|
|
|
|
In a header file I have
#define NOMINDEX 0
...
#define ETABLESIZE 5
In the source file that includes this header, the following doesn't seem to work (it's writing 0 to the buffer (and in the watch window in VS, it's saying it doesn't recognise the symbols defined)
sprintf_s( eBuff, 16, "%d", energyTable[ETABLESIZE*sel + NOMINDEX] );
if I add this line before it, "e" is correctly assigned to 5
int e = ETABLESIZE;
sprintf_s( eBuff, 16, "%d", energyTable[ETABLESIZE*sel + NOMINDEX] );
In other parts of my cpp file I use these constants and they seem to work correctly.
Have I done something incredibly stupid?
cheers
Lee
|
|
|
|
|
The answer of course is, yes, I was doing something incredibly stupid. I really ought to try the count to 10 rule before posting
unsurprisingly,
sprintf_s( eBuff, 16, "%.0f", energyTable[ETABLESIZE*sel + NOMINDEX] );
works rather better, since energyTable is a float array
DOH!
sorry.....
|
|
|
|
|
Could it be that your sel variable is 0 and you just didn't notice?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
It should work, indeed. That stated, why don't you use an enum for your symbols?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I want to get the info about all (currently 4) cpu-cores I have.
The most information I get is with the WMI-system (WIN32_processor).
I found at all web-pages the same sample-code for the WMI-access with C++.
I changed it for my needs and it works almost fine. The only
problem is that it gives me only the data for CPU0, but not
the 3 others.
As soon as i change the WQL request to ("SELECT * FROM Win32_Process")
the "while (pEnumerator)"-loop works fine and I get all processes currently running.
So I don't understand why the WQL request returns only the first CPU...
Thanks a lot for any help!
best regards
Peter
>>>> Output >>>>
Number of processors: 4 // from GetSystemInfo()
DeviceID : CPU0
LoadPercentage : 7
Name : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
>>>> code >>>
#define _WIN32_DCOM
#include <iostream>
using namespace std;
#include <comdef.h>
#include <wbemidl.h>
# pragma comment(lib, "wbemuuid.lib")
int main(int argc, char **argv)
{
HRESULT hres;
SYSTEM_INFO siSysInfo;
// Copy the hardware information to the SYSTEM_INFO structure.
GetSystemInfo(&siSysInfo);
cout << "Number of processors: " << siSysInfo.dwNumberOfProcessors << endl;
// Step 1: --------------------------------------------------
// Initialize COM. ------------------------------------------
hres = CoInitializeEx(0, COINIT_MULTITHREADED);
if (FAILED(hres))
{
cout << "Failed to initialize COM library. Error code = 0x"
<< hex << hres << endl;
return 1; // Program has failed.
}
// Step 2: --------------------------------------------------
// Set general COM security levels --------------------------
// Note: If you are using Windows 2000, you need to specify -
// the default authentication credentials for a user by using
// a SOLE_AUTHENTICATION_LIST structure in the pAuthList ----
// parameter of CoInitializeSecurity ------------------------
hres = CoInitializeSecurity(
NULL,
-1, // COM authentication
NULL, // Authentication services
NULL, // Reserved
RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication
RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation
NULL, // Authentication info
EOAC_NONE, // Additional capabilities
NULL // Reserved
);
if (FAILED(hres))
{
cout << "Failed to initialize security. Error code = 0x"
<< hex << hres << endl;
CoUninitialize();
return 1; // Program has failed.
}
// Step 3: ---------------------------------------------------
// Obtain the initial locator to WMI -------------------------
IWbemLocator *pLoc = NULL;
hres = CoCreateInstance(
CLSID_WbemLocator,
0,
CLSCTX_INPROC_SERVER,
IID_IWbemLocator, (LPVOID *) &pLoc);
if (FAILED(hres))
{
cout << "Failed to create IWbemLocator object."
<< " Err code = 0x"
<< hex << hres << endl;
CoUninitialize();
return 1; // Program has failed.
}
// Step 4: -----------------------------------------------------
// Connect to WMI through the IWbemLocator::ConnectServer method
IWbemServices *pSvc = NULL;
// Connect to the root\cimv2 namespace with
// the current user and obtain pointer pSvc
// to make IWbemServices calls.
hres = pLoc->ConnectServer(
_bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace
NULL, // User name. NULL = current user
NULL, // User password. NULL = current
0, // Locale. NULL indicates current
NULL, // Security flags.
0, // Authority (e.g. Kerberos)
0, // Context object
&pSvc // pointer to IWbemServices proxy
);
if (FAILED(hres))
{
cout << "Could not connect. Error code = 0x"
<< hex << hres << endl;
pLoc->Release();
CoUninitialize();
return 1; // Program has failed.
}
// Step 5: --------------------------------------------------
// Set security levels on the proxy -------------------------
hres = CoSetProxyBlanket(
pSvc, // Indicates the proxy to set
RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx
RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx
NULL, // Server principal name
RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx
RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx
NULL, // client identity
EOAC_NONE // proxy capabilities
);
if (FAILED(hres))
{
cout << "Could not set proxy blanket. Error code = 0x"
<< hex << hres << endl;
pSvc->Release();
pLoc->Release();
CoUninitialize();
return 1; // Program has failed.
}
// Step 6: --------------------------------------------------
// Use the IWbemServices pointer to make requests of WMI ----
// For example, get the name of the operating system
IEnumWbemClassObject* pEnumerator = NULL;
hres = pSvc->ExecQuery(
bstr_t("WQL"),
bstr_t("SELECT * FROM Win32_Processor"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumerator);
if (FAILED(hres))
{
cout << "Query for processors failed."
<< " Error code = 0x"
<< hex << hres << endl;
pSvc->Release();
pLoc->Release();
CoUninitialize();
return 1; // Program has failed.
}
// Step 7: -------------------------------------------------
// Get the data from the query in step 6 -------------------
IWbemClassObject *pclsObj;
ULONG uReturn = 0;
while (pEnumerator)
{
HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj, &uReturn);
if(0 == uReturn)
{
break;
}
VARIANT vtProp;
VariantInit(&vtProp);
// Get the value of the Name property
hr = pclsObj->Get(L"DeviceID", 0, &vtProp, 0, 0);
wcout << " DeviceID : " << vtProp.bstrVal << endl;
VariantClear(&vtProp);
VariantInit(&vtProp);
// Get the value of the Name property
hr = pclsObj->Get(L"LoadPercentage", 0, &vtProp, 0, 0);
wcout << " LoadPercentage : " << vtProp.uintVal << endl;
VariantClear(&vtProp);
VariantInit(&vtProp);
// Get the value of the Name property
hr = pclsObj->Get(L"Name", 0, &vtProp, 0, 0);
wcout << " Name : " << vtProp.bstrVal << endl;
VariantClear(&vtProp);
pclsObj->Release();
}
// Cleanup
pSvc->Release();
pLoc->Release();
pEnumerator->Release();
CoUninitialize();
return 0; // Program successfully completed.
}
>>>> Output >>>>
Number of processors: 4
DeviceID : CPU0
LoadPercentage : 7
Name : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
modified on Thursday, February 5, 2009 8:48 AM
|
|
|
|
|
How many processors do you actually have? I think you'd have to agree that there's only 1. That is why WMI only returns one Win32_Processor record. However, Win32_Processor has a NumberOfCores property that should return '4' for you - it returns '2' for me (I only have an E6600, so only two cores).
|
|
|
|
|
1) The last lines of my entry show the output of my application. Fact: I have 4 cores.
2) I use VisualStudio 2005 and there I cannot find any "NumberOfCores" at WIN32_processor...??
3) I need the LoadPercentage of each core and not only one of them...
|
|
|
|
|
Pasy_m wrote: 2) I use VisualStudio 2005 and there I cannot find any "NumberOfCores" at WIN32_processor...??
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Ok. I found it, but that's value I already get with GetSystemInfo(). I still need to get the MWI-objects for all four CPU-cores...
|
|
|
|
|
It seems to be a problem at the window-side. I could test my software on a single-core CPU with Hyperthreading (number of cores = 2) and in this case I got the data for both "cores"...
|
|
|
|
|
Hi friends,
I had tried to stretch a Gif image and unable to do
My code is :
CImage image;
HDC dc = GetWindowDC()->GetSafeHdc();
BYTE *m_buffer;
CFile file;
if( !file.Open( MAKEINTRESOURCE(IDR_GIF1), CFile::modeRead) )
return false;
long m_buffer_size = (long)file.GetLength();
m_buffer = new BYTE[m_buffer_size];
if ( file.Read(m_buffer, m_buffer_size) != m_buffer_size )
return false;
file.Close();
IStream *pIstream;
CreateStreamOnHGlobal(NULL, TRUE, (LPSTREAM*)&pIstream);
ULARGE_INTEGER ulnSize;
ulnSize.QuadPart = m_buffer_size;
pIstream->SetSize(ulnSize);
LARGE_INTEGER lnOffset;
lnOffset.QuadPart = 0; //starting location is 0
pIstream->Seek(lnOffset, STREAM_SEEK_SET, NULL);
ULONG mysize;
pIstream->Write(m_buffer,m_buffer_size,&mysize);
image.Load(pIstream);
CRect rectDest;
rectDest.top = 0;
rectDest.bottom = 50;
rectDest.left = 0;
rectDest.right = 50;
image.StretchBlt(dc, rectDest, PATCOPY);
image.Draw(dc,0,0);
Kindly help me ..
Thanks in Advance..
|
|
|
|
|
Try SRCCOPY rather than PATCOPY?
|
|
|
|
|