|
I can not find good documents about Format of true-type-font file.
could you give me some links or comments?
thx
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Here.[^]
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thanks,
but-
main link inside your link is invalid.
I navagated to other links there and found only software, which is not about file format.
could u give me a direct link to file-format?
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
includeh10 wrote: main link inside your link is invalid.
Huh? The first link on that page is to here: http://www.microsoft.com/typography/otspec/[^]. It works perfectly for me and the second link on that page give the file format...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
OpenType is an extension of TrueType - currently I should learn basic - TrueType, not OpenType - for start.
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
That page covers both. If you're wanting to learn about font files, TrueType is a legacy, older format that Microsoft doesn't directly support any more. Learn OpenType as well.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hi
How to use a DLL developed in VB.NET in VC++, i am using VC2005 IDE
|
|
|
|
|
It needs to be a COM dll, then you can use it via COM. Unless it's a VB 2005 DLL, then you can create a C++/CLI project, which means your C++ project is reliant on the .NET framework, and you can then add it as a reference.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think you'll have to wrap the DLL in a COM callable wrapper (CCW).
Steve
|
|
|
|
|
Do you know where I can get a printable version of the MSDN Winsock 2 Reference? My eyes hurt when i have to read online much so I like to print out and read offline instead.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/winsock_reference.asp
Thanks
|
|
|
|
|
buy a very dark screen-filter, which is very useful for your eyes - I am using it now.
Before I used the screen-filter, I got big headache if watched online too long every day. it is fine now.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Install a virtual printer (such as virtual pdf printer),
then press ctrl+P in Firefox for save it to virtual printer.
|
|
|
|
|
Have you checked the refresh rate of your display? That is a common cause of headaches after long periods, try to get it up to 80-85Hz.
The tigress is here
|
|
|
|
|
"Windows Sockets 2 Application Programming Interface" at
ftp://ftp.microsoft.com/bussys/winsock/winsock2/wsapi22.doc[^]. I think there are pdf'd versions of it around, if you search for them.
But even though it's written for Winsock 2.2, it was released in August of 1997. So, some parts are clearly out-of-date (e.g., SO_RECVTIMEO is supported currently, even though the above 1997 release says it's not).
So, at the end of the day, you will still need to check at the on-line docs for complete currency.
Best regards,
Mike
|
|
|
|
|
I have developed a dll say MyExtension.dll which is in folder say c:\data\ but it can be really anywhere. ( One step beyond this is that the dll filename can be renamed to anything)
This dll is loaded by another process SomeProcess.exe which is running from say c:\windows. This process and its code is not in my control.
From within the code in my dll can I programatically determine the name of the dll and the path from which the dll is located (i.e I want to find the current executing code resides in c:\data\MyExtension.dll.)
The best I can think of is using toolhelp api to take a snapshot of all modules in the current process. Then search by my module name by iterating over the MODULEENTRY32 data structure. But this means that I have to hardcode atleast the module (dll) name to search. Is there any other way to basically determine the filename of the dll under which the code is executing.
(From a real world perepective I am developing a ISAPI extension dll loaded by IIS worker process. The file name and path is mapped using IIS configuration)
|
|
|
|
|
Use the GetModuleFileName API. The hModule parameter is the hinstDLL passed to your DllMain . You will need to cast it to a HMODULE . i.e. HMODULE hMod = reinterpret_cast<HMODULE>(hinstDLL); .
Steve
|
|
|
|
|
Thanks for letting me know that.
Unfortunately because the dll is a atl server dll it has a different dll main method as defined by the ATL server framework. So the above method won't work.
I am quoting from MSDN.
CAtlDllModuleT::DllMain
The optional entry point into a dynamic-link library (DLL).
BOOL WINAPI DllMain(
DWORD dwReason,
LPVOID /*lpReserved*/
) throw( );
Parameters
dwReason
If set to DLL_PROCESS_ATTACH, the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls are disabled.
lpReserved
Reserved.
Stephen Hewitt wrote: Use the GetModuleFileName API. The hModule parameter is the hinstDLL passed to your DllMain. You will need to cast it to a HMODULE. i.e. HMODULE hMod = reinterpret_cast<hmodule>(hinstDLL);.
Steve
|
|
|
|
|
Use this instead:
HMODULE hMod = reinterpret_cast<HMODULE>(_Module.GetModuleInstance());
Steve
|
|
|
|
|
Thanks very much.
Just one thing it should be _AtlBaseModule.GetModuleInstance()
Cheers
kanad
Stephen Hewitt wrote: HMODULE hMod = reinterpret_cast<hmodule>(_Module.GetModuleInstance());
|
|
|
|
|
Ok. I haven't got the latest ATL (I still use MSVC6, pity me) so I just gleamed this advice from the documentation and knowledge of MSVC6's version of ATL.
Steve
|
|
|
|
|
try this
TCHAR tczFileName[ MAX_PATH ];
MEMORY_BASIC_INFORMATION stMemoryInfo;
static int nAddress;
HMODULE hModule = 0;
// Get the information about the virtual address space of the calling process
if( VirtualQuery( &nAddress, &stMemoryInfo, sizeof( stMemoryInfo ))
!= 0 )
{
hModule = reinterpret_cast<hmodule>(
stMemoryInfo.AllocationBase);
}
// Get the exe's or ddl's file name
DWORD dwFileNameLength = GetModuleFileName( hModule,tczFileName,
MAX_PATH );
nave
|
|
|
|
|
Hi,
I would like to use memcpy() function to copy my source data into my destination data at a time rather than using for loop to go one by one. But the problem that I am not understanding is, my destination buffer size is not same as my source buffer size , but is greater than the later for sure. So, what all I want to implement is first copy all the source data into my destination buffer and again copy the source data into the rest of my destination buffer (yeh, this time the length of the copied buffer shoudl be the size of the left over buffer from the first iteration). For example-
Say my source buffer = 630000 bytes, destination buffer = 630272 bytes
So on fisr iteration of memcopy i would copy the whole 630000bytes of my source buffer into my destination buffer, so at this point destination buffer is left with 272bytes more room, so what I want is to copy the first 272 bytes of source buffer into the remaining destination buffer.
Is there anyway to implement this using memcpy() or memmove() etc functions?? I would really appreciate if anyone can help me out in this.
thanks in advance,
-Pav
|
|
|
|
|
pavanbabut wrote: Say my source buffer = 630000 bytes, destination buffer = 630272 bytes
So on fisr iteration of memcopy i would copy the whole 630000bytes of my source buffer into my destination buffer, so at this point destination buffer is left with 272bytes more room, so what I want is to copy the first 272 bytes of source buffer into the remaining destination buffer.
Is there anyway to implement this using memcpy() or memmove() etc functions?? I would really appreciate if anyone can help me out in this.
I am not sure why you would want to do this... but you can add to a pointer to offset location. if you want byte offset, only add to char pointers.
void strangecopy(char *dest, int destsize, char *source, int sourcesize)
{
do
{
if (destsize<sourcesize)
{
memcpy(dest,source,destsize);
} else
{
memcpy(dest,source,sourcesize);
}
dest+=sourcesize;
destsize-=sourcesize;
} while (destsize>sourcesize);
}
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-- modified at 23:32 Thursday 6th April, 2006
|
|
|
|
|
Hi,
thanks for your reply. yeh, it looks strange.. hehe.. memcpy() is the only way that I can think of to get around the for loop which greatly reduces the speed in real time. Actually my destination buffers are the buffers that are allocated on a PCI board which should be in multiples of 1024 only whereas my source data is not in multiples of 1024. So, the only way I cna do this is as follows-
iteration1- destination buffer1(0:629999) = srouce buffer
iteration2- destination buffer1(630000:630271) = source buffer(0:271)
destination buffer2(0:629727) = source buffer(272:630000)
iteration3- destination buffer2(629728:630272) = source buffer(0:543)
destination buffer3(0:629455) = source buffer(544:630000)
.....
think the destination buffers as circular buffers.
Hope now the problem is clear... Actually I haven't gone through your example, will do now after my dinner
thanks,
-Pav
|
|
|
|
|
Typically the advantage of using one of the supplied functions, like memcpy or memmove is that they are optimized to use the best possible processor instructions. If you code the same operation as a for loop, your performance might be less.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|